Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
transactional-email-templates
Advanced tools
Customizable transitional HTML email templates for node.js, compiled with variable content
Customizable transitional HTML email templates for Node.js, compiled with variable content. Each template is responsive and each has been tested in all the popular email clients.
const templates = require('transactional-email-templates');
const alertEmailHTML = templates.alert({
title: 'You are approaching your limit',
alert: "Warning: You're approaching your limit. Please upgrade.",
alertColor: '#FD9E28',
bodyElements: [
'You have <strong>1 free report</strong> remaining.'
"Add your credit card now to upgrade your account to a premium plan to ensure you don't miss out on any reports.",
],
link: 'http://www.mailgun.com/',
linkCTA: 'Confirm Email Address',
linkColor: '#3A90D7',
byline: 'Thanks for choosing Acme, Inc.',
unsubscribeLink: 'https://www.mailgun.com',
unsubscribeLinkText: 'Unsubscribe from these alerts.',
});
// yields http://mailgun.github.io/transactional-email-templates/alert.html
const currency = '$';
const totalCost = 33.98;
const billingEmailHTML = templates.billing({
title: 'Paid',
headline: `${currency} ${totalCost} Paid`,
addressElements: [
'Lee Munroe',
'Invoice #12345',
'June 01 2014',
],
lineItems: [
{ title: 'Service 1', amount: 19.99 },
{ title: 'Service 2', amount: 9.99 },
{ title: 'Service 3', amount: '4.00' },
],
link: 'https://mailgun.com',
linkCTA: 'View in browser',
byline: 'Acme Inc. 123 Van Ness, San Francisco 94102',
footerText: 'Questions? Email ',
footerLink: 'mailto:support@acme.inc',
footerLinkText: 'support@acme.inc',
currency,
totalCost,
});
// yields http://mailgun.github.io/transactional-email-templates/billing.html
const actionEmailHTML = templates.action({
title: 'Reset your password',
bodyElements: [
'Please confirm your email address by clicking the link below.',
'We may need to send you critical information about our service and it is important that we have an accurate email address.',
],
link: 'http://www.mailgun.com/',
linkCTA: 'Confirm Email Address',
linkColor: '#3A90D7',
byline: '- The Mailgunners',
footerText: 'Follow ',
footerLink: 'http://twitter.com/mail_gun',
footerLinkText: '@Mail_Gun on Twitter',
});
// yields http://mailgun.github.io/transactional-email-templates/action.html
/**
* Build alert email HTML
* module.exports.alert
*
* @access public
* @param {Object} data
* @param {String} data.title
* @param {String} data.alert
* @param {String} [data.alertColor]
* @param {String[]} data.bodyElements
* @param {String} data.link
* @param {String} data.linkCTA
* @param {String} [data.linkColor]
* @param {String} [data.byline]
* @param {String} data.footerText
* @param {String} [data.footerLink]
* @param {String} [data.footerLinkText]
* @param {String} [data.unsubscribeLink]
* @param {String} [data.unsubscribeLinkText]
* @returns {String} HTML email content
*/
/**
* Build action email HTML
* module.exports.action
*
* @access public
* @param {Object} data
* @param {String} data.title
* @param {String[]} data.bodyElements
* @param {String} data.link
* @param {String} data.linkCTA
* @param {String} [data.linkColor]
* @param {String} [data.byline]
* @param {String} data.footerText
* @param {String} [data.footerLink]
* @param {String} [data.footerLinkText]
* @param {String} [data.unsubscribeLink]
* @param {String} [data.unsubscribeLinkText]
* @returns {String} HTML email content
*/
/**
* Build billing/invoice email HTML
* module.exports.billing
*
* @access public
* @param {Object} data
* @param {String} data.title
* @param {String} [data.alert]
* @param {String} [data.alertColor]
* @param {String} [data.headline]
* @param {String[]} data.bodyElements
* @param {String[]} data.addressElements
* @param {String} [data.link]
* @param {String} [data.linkCTA]
* @param {String} data.currency
* @param {String} data.totalTitle
* @param {Number|String} data.totalCost
* @param {LineItem[]} data.lineItems
* @param {String} [data.byline]
* @param {String} data.footerText
* @param {String} [data.footerLink]
* @param {String} [data.footerLinkText]
* @param {String} [data.unsubscribeLink]
* @param {String} [data.unsubscribeLinkText]
* @returns {String} HTML email content
*/
/**
* @typedef {Object} LineItem
* @property {String} title
* @property {Number|String} amount
*/
$ npm install transactional-email-templates --save
FAQs
Customizable transitional HTML email templates for node.js, compiled with variable content
The npm package transactional-email-templates receives a total of 0 weekly downloads. As such, transactional-email-templates popularity was classified as not popular.
We found that transactional-email-templates 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.