This library permits to send emails using Mailjet's API in Node.js. It's MIT licensed.
npm install mailjet-sendemail
Access to the API is done through a Mailjet object. It's instantiated like so:
var Mailjet = require('mailjet-sendemail');
var mailjet = new Mailjet('apiKey', 'secretKey');
Sends an email.
mailjet.sendContent(from, to, subject, type, content);
example@example.com
).With plain text :
mailjet.sendContent('sender@example.com',
['recipient1@example.com', 'bcc:recipient2@example.com'],
'This is a test !',
'text',
'Well, this is working !')
With HTML :
mailjet.sendContent('sender@example.com',
['recipient1@example.com', 'bcc:recipient2@example.com'],
'This is a test !',
'html',
'<b>Well, this is working !</b>')