Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
mustache-mailer
Advanced tools
A mustache-template-backed mailer. Built with handlebars, and nodemailer, inspired by ActionMailer.
foo.text.hbs
, for text email templates.foo.meta.hbs
, meta information in JSON format, e.g., subject
.foo.html.hbs
, for html email templates.MustacheMailer
with:transport
: the transport module you wish to use, e.g., SES.templateDir
: the path to the template directory.var mm = new MustacheMailer({
transport: require('nodemailer-ses-transport')({
accessKeyId: 'AWSACCESSKEY',
secretAccessKey: 'AWS/Secret/key'
}),
templateDir: './mail-templates'
});
MessageMailer
instance to grab a template:html
template and a text
template, both will be sent.sendMail
are sent to nodemailer
, and
to the mustache templates.var msg = mm.message('confirmation', function(err, msg) {
msg.sendMail({
to: 'bencoe@gmail.com',
name: 'Ben',
id: 'adfasdfadsfasdf'
});
}
tokenFacilitator
PluginIt often arises that you'd like to toss a token inside an email, e.g., click this confirmation link to change your password.
For generating these tokens, MustacheMailer allows you to install a
tokenFacilitator
plugin:
var mm = new MustacheMailer({
transport: mock,
templateDir: path.resolve(__dirname, './fixtures'),
// a fake token facilitator.
tokenFacilitator: {
generate: function(data, cb) {
setTimeout(function() {
data.email.should.eql('zeke@example.com');
data.name.should.eql('Zeke');
return cb(null, parseInt(Math.random() * 256));
}, 20);
}
}
});
http://example.com/{{{tokenHelper name=name email=email}}}
key
, value
pairs in data.FAQs
send emails using nodemailer, and mustache templates.
We found that mustache-mailer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 28 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.