6.0.0 • Published 3 months ago

mg_newsletter v6.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Npm-email

// Example of how to call the functions const { sendFavMail } = require('mg-newsletter');

const emailTemplate = { subject: 'Test Subject', body: 'Hello {{Username}}, Your email is {{email}}' };

const smtpConfig = { host: 'smtp.gmail.com', port: 587, secure: false, user: process.env.YOUR_EMAIL_ID,//replace with your ID in env file pass: process.env.EMAILKEY // replace with your EmailKEY in env file

//How to get EMAILKEY 1.Go to email settings 2.Complete 2step verification 3.Then get your App Key

};

const recipient = 'eg2@gmail.com'; const data = { email: 'user@example.com', avatar: 'avatar-url', firstName: 'John', lastName: 'Doe', useFor: 'favCompanyJobSubmission', companyName: 'Example Company', jobTitle: 'Software Engineer', jobDescription: 'Job Description' };

sendFavMail(emailTemplate, smtpConfig, recipient, data) .then(() => console.log('sendFavMail function called successfully')) .catch(error => console.error('Error calling sendFavMail function:', error));

mg-email

mg-email

mg_email

6.0.0

3 months ago

5.0.0

3 months ago

4.0.0

3 months ago

3.0.0

3 months ago