cfe-mailer
v1.1.0
Published
This is a simple mailer module which use @sendgrid/mail package
Downloads
7
Readme
cfe-mailer
FOR SENDING EMAILS USIN SENDGRID
Usage
const mail=require('cfe-mailer');
// LINK ===> THIRD PARAMETER NEED TO SEND THE LINKS For Ex. PASSWORD RESET LINK
var Mail=new mail(API_KEY,SOURCE_EMAIL_NAME_ANY);
//FOR REGISTRATION MAIL (USES BUILT IN HTML TEMPLATE)
Mail.registration(USER_NAME,USER_EMAIL,LINK);
//FOR NEW ACTIVATION LINK MAIL (USES BUILT IN HTML TEMPLATE)
Mail.resetLink(USER_NAME,USER_EMAIL,LINK);
//FOR ACTIVATION NOTIFICATION (USES BUILT IN HTML TEMPLATE)
Mail.activation(USER_NAME,USER_EMAIL,LINK);
//FOR FORGET PASSWORD MAIL (USES BUILT IN HTML TEMPLATE)
Mail.forgetPassword(USER_NAME,USER_EMAIL,LINK);
// TO NOTIFY THE USER ABOUT PASSWORD RESET (USES BUILT IN HTML TEMPLATE)
Mail.resetNotification(USER_NAME,USER_EMAIL,LINK);
//TO SEND CUSTOM EMAILS
Mail.custom(USER_MAIL,SOURCE_MAIL,EMAIL_SUBJECT,HTML_TEMPLATE,TEXT)
//NOTE:====>>>> ALL ARGUMENTS ARE OF TYPE STRING
## License
Apache 2.0