Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
ghost-email-service
Advanced tools
nodejs client to interact with the sendgrid and mailchimp apis
npm install ghost-email-service --save
Provide sendgrid secret key + template names and the associated ID's
{
"email": {
"processor": "sendgrid",
"sendgrid": {
"secretKey": "[sendgrid secret key]",
"templates": {
"templateName": "[templateId]"
},
"sandboxMode": true,
"defaults": {
"fromEmail": "noreply@yourwebsite.com",
"fromName": "Pablo Escobar",
"replyTo": "contact@yourwebsite.com"
}
}
}
}
{
"email": {
"processor": "mailchimp",
"mailchimp": {
"secretKey": "[mailchimp api key]",
"mandrill": "[mandrill api key]"
}
},
"defaults": {
"fromEmail": "noreply@yourwebsite.com",
"fromName": "Justin Tucker",
"replyTo": "contact@yourwebsite.com"
}
}
{
"fromEmail": "noreply@domain.com",
"fromName": "The Ghost Team",
"toEmail": "noreply@domain.com",
"toName": "Test User",
"subject": "Test Email",
"substitutions": {
"url": "http://test.com",
"name": "Test User"
}
}
{
"fromEmail": "noreply@domain.com",
"fromName": "The Ghost Team",
"toEmail": "noreply@domain.com",
"toName": "Test User",
"replyTo": "noreply@domain.com",
"subject": "Test Email",
"globalMergeVars": {
"url": "http://test.com",
"name": "Test User"
}
}
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.
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.
const GhostEmail = require('ghost-email-service');
const EmailService = new GhostEmail(config)
// See config above
The template name should correspond to a template id within the config object
The template name should correspond to a template found within your mailchimp templates
EmailService.send('templateName',obj)
.then(result => { ... })
.catch(err => { ... });
// See obj above
FAQs
nodejs client to interact with the sendgrid and mailchimp apis
We found that ghost-email-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.