email-engine
v1.1.6
Published
Email Engine
Maintainers
Readme
Email Engine
A simple engine who sets your API key and send mail for different platform like SendGrid,Mailgun, AWS-SES etc
How to Use
npm install email-engine --saveSet your respective API key
For Mailgun
const emailEngine = require('email-engine');
emailEngine.setKey(process.env.YOUR_API_KEY, 'MAIL_GUN', process.env.DOMAIN);For Send Grid
- Set your API KEY (API KEYS)
const emailEngine = require('email-engine');
emailEngine.setKey(process.env.YOUR_API_KEY, 'SEND_GRID');- Send Mails
to = "[email protected]";
subject = "any subject";
html = "any html or your html template";
from = "[email protected]"
emailEngine.sendMailFromSendGrid(to, subject, html,from);- For Declaring From constant
emailEngine.setFromMail('[email protected]');Now you would not pass from mail in sending mail.
Happy Coding
##Future plans
- Adding AWS-SES
- Testing
- Multiple Mails
- Cron Mails
