1.0.1 • Published 1 year ago

mg-newsletter v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

��# Npm-email //Example of how to call the functions const { sendMail, sendFavMail } = require('mg-email'); const emailTemplate = { subject: 'Test Subject', body: 'Hello {{Username}}, Your email is {{email}}' }; const smtpConfig = { host: 'smtp.gmail.com', port: 587, secure: false, user: 'eg@gmail.com', // replace with your mail ID pass: 'your-password'// replace with your password }; 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' }; sendMail(emailTemplate, smtpConfig, recipient, data) .then(() => console.log('sendMail function called successfully')) .catch(error => console.error('Error calling sendMail function:', error)); sendFavMail(emailTemplate, smtpConfig, recipient, data) .then(() => console.log('sendFavMail function called successfully')) .catch(error => console.error('Error calling sendFavMail function:', error));

1.0.1

1 year ago