Ghost Email Service
Installation
npm install ghost-email-service --save
Overview
Config (default listed below)
Provide sendgrid secret key + template names and the associated ID's
Sendgrid Config
MailChimp Config
SendGrid Send obj config(default listed below)
MailChimp Send obj config(default listed below)
Models
Sendgrid
The module will attempt to load the mail send services provided in the config object
assuming a valid secret key and template id's, along with the sandbox setting.
All templates will be available via the send(templateName, obj)
method.
MailChimp
The module will attempt to load the mail send services provided in the config object
assuming a valid secret key and mandrill key.
All templates will be available via the send(templateName, obj)
method.
See examples below.
Follow the steps below to get the module up and running.
1. Require
const GhostEmail = ;
2. Instantiate
const EmailService = config// See config above
3. Send Email
Sendgrid
The template name should correspond to a template id within the config object
MailChimp
The template name should correspond to a template found within your mailchimp templates
EmailService;// See obj above