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.
hapi-mandrill
Advanced tools
HAPI plugin that exposes mandrill api - used to send transactional emails.
(C) 2014 Martin Wawrusch
HAPI plugin that exposes mandrill api - used to send transactional emails.
The rational behind this is that every single hapi app I created needs transactional emails, and it always involves plumbing code. With this module I provide the most common usecase with a well defined signature, and also expose the mandrillClient.
The key and templateNameMapping parameters are optional, but without a key nothing gets sent (useful for testing).
hapiMandrill = require 'hapi-mandrill'
pluginConf = [
plugin: hapiMandrill
options:
senderName: "John Smith"
senderEmail: "john@smith.com"
key : null # Keep null for testing
templateNameMapping:
"from" : "toInMandrill"
]
server.pack.register pluginConf, (err) ->
#...
fnCallback = (err,result) ->
# Do some stuff when done.
plugin = server.pack.plugins['hapi-mandrill']
plugin.send("Angelina Jolie","angelina@jolie.com", {some: "payload"},"Hello Angelina","angelina-template", fnCallback)
The plugin logs successful and failed sends. NOTE: If you want to disable this, or want different log tags let me know and I will make it customizable.
Mandrill templates are often managed by third parties, you don't want them to break a core functionaly without testing it first yourself. For that reason, you can define internal template names and transform them to whatever you want to use in mandrill. To do so, set the 'templateNameMap' object to internal : external pairs. If none is defined, or a key is not found it will be passed verbatim.
plugin = server.pack.plugins['hapi-mandrill']
plugin.mandrillClient # Note this is null if you do not pass a key in options
plugin.send(...)
plugin.templateNameMapping = {...}
and additionally
Copyright (c) 2014 Martin Wawrusch
FAQs
HAPI plugin that exposes mandrill api - used to send transactional emails.
The npm package hapi-mandrill receives a total of 3 weekly downloads. As such, hapi-mandrill popularity was classified as not popular.
We found that hapi-mandrill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.