Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
mandrill-nodemailer-transport
Advanced tools
Mandrill API and Nodemailer v4+. The plugin is very small, optimized and written in TypeScript
The custom transport plugin that allows to send email using Nodemailer via Mandrill
Created for the new Mandrill API and Nodemailer v4+. The plugin is very small, optimized and written in TypeScript
If you like to use this module please click the star button - it is very motivating.
Install mandrill-nodemailer-transport using npm:
$ npm install mandrill-nodemailer-transport --save
Nodemailer common fields are supported and replyTo
send simple email
'use strict';
const nodemailer = require('nodemailer');
const MandrillTransport = require('mandrill-nodemailer-transport');
let transporter = nodemailer.createTransport(new MandrillTransport({
apiKey: '12124124124124-key-test'
}));
transporter.sendMail({
from: 'email@example.com',
to: 'recipient@test.com',
replyTo: 'reply-to@example.com',
subject: 'Mandrill Transport',
text: 'This is text content'
}).then((info) => {
console.log('SUCCESS');
}).catch((error) => {
console.log('Something is wrong');
});
send attachment and add to content
'use strict';
const nodemailer = require('nodemailer');
const MandrillTransport = require('mandrill-nodemailer-transport');
let transporter = nodemailer.createTransport(new MandrillTransport({
apiKey: '12124124124124-key-test'
}));
transporter.sendMail({
from: 'email@example.com',
to: 'recipient@test.com',
replyTo: 'reply-to@example.com',
subject: 'Mandrill Transport',
html: '<!DOCTYPE html><html><body><img src="cid:attachment" alt="attachment"></body></html>',
attachments: [{
content: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAA...', // base64 content
cid: 'attachment',
contentType: 'image/jpeg',
filename: 'attachment.jpg',
encoding: 'base64'
}]
}).then((info) => {
console.log('SUCCESS');
}).catch((error) => {
console.log('Something is wrong');
});
FAQs
Mandrill API and Nodemailer v4+. The plugin is very small, optimized and written in TypeScript
The npm package mandrill-nodemailer-transport receives a total of 522 weekly downloads. As such, mandrill-nodemailer-transport popularity was classified as not popular.
We found that mandrill-nodemailer-transport 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.