mg_newsletter
v6.0.0
Published
// Example of how to call the functions <br /> const { sendFavMail } = require('mg-newsletter'); <br />
Downloads
6
Readme
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 = '[email protected]'; const data = { email: '[email protected]', 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
#� �m�g�_�e�m�a�i�l� � �