
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
node-emailer
Advanced tools
Module for Email send with pug render (optional)
$ npm install --save node-emailer
const app = require( 'express' );
// Or if you are using keystonejs:
// const app = require( 'keystone' );
app.set( 'smtp_user', process.env.SMTP_USER );
app.set( 'smtp_password', process.env.SMTP_PASSWORD );
app.set( 'smtp_host', process.env.SMTP_HOST );
app.set( 'smtp_port', process.env.SMTP_PORT );
app.set( 'smtp_ssl', true );
// some useful code...
const nodeEmailer = require( 'node-emailer' )( app ) ;
function sendWithRender() {
const templateName = 'test.pug';
const templateDir = 'email-templates';
const message = {
from: app.get( 'smtp_user' ),
to: 'user@example.ru',
subject: 'Test subject!'
};
const locals = {
href: 'http://127.0.0.1',
link: 'Go to home'
};
nodeEmailer
.setOption( 'emailTemplateDir', templateDir )
.connect( {
user: app.get( 'smtp_user' )
} )
.render( message, templateName, locals )
.sendMail( ( err, msg ) => console.log( err, msg ) );
}
function sendWithOutRender() {
const message = {
from: app.get( 'smtp_user' ),
to: 'user@example.ru',
subject: 'Test subject!',
text: 'Go to home: http://127.0.0.1'
};
nodeEmailer
.connect( {
user: app.get( 'smtp_user' )
} )
.render( message )
.sendMail( ( err, msg ) => console.log( err, msg ) );
}
sendWithRender();
sendWithOutRender();
FAQs
Module for Email send with pug render (optional)
The npm package node-emailer receives a total of 0 weekly downloads. As such, node-emailer popularity was classified as not popular.
We found that node-emailer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.