Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.