1.0.40 • Published 5 months ago

gror_mail v1.0.40

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

Gror Mail

  • module

Gror Mail is a Node.js module for sending email messages with PDF attachments using the Mailjet email service and the Nodemailer library and uses the pdf package to generate PDFs from HTML.

This also has the zipping capabilities for large files.

Installation

To use this module, you first need to install it and its dependencies:

Copy code

npm install gror_mail

Usage

First, you need to initialize the module with username and password:

Copy code

const email_handler = require('gror_mail');

email_handler.init('username', 'password'); 

Then, you can use the sendEmailWithPdf function to send an email with a PDF attachment:

Copy code

const html = '<p>Hello, world!</p>';
const fileName = 'example.pdf';
const subject = 'Example Subject';
const text = 'This is an example email.';
const recipients = ['recipient1@example.com', 'recipient2@example.com'];
const zip_required = false

email_handler.sendEmailWithPdf(html, fileName, subject, text,recipients,zip_required);

The sendEmailWithPdf function takes five arguments:

  • html: The HTML content to generate the PDF from
  • fileName: The name of the PDF file to attach to the email
  • subject: The subject line of the email
  • text: The text content of the email
  • recipients: An array of recipient email addresses
  • zip_required: a boolean if the document should be zipped or not ( default is false)

License

This module is licensed under the MIT License.

1.0.39

5 months ago

1.0.38

5 months ago

1.0.40

5 months ago

1.0.37

5 months ago

1.0.29

6 months ago

1.0.33

6 months ago

1.0.32

6 months ago

1.0.31

6 months ago

1.0.30

6 months ago

1.0.36

6 months ago

1.0.35

6 months ago

1.0.34

6 months ago

1.0.28

7 months ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago