Mandrill.sendPlaintextEmail()

Send a plaintext email to the specified recipient.

Usage

Hover over inputs/exits for more info.

var Mandrill = require('machinepack-mandrill');


// Send a plaintext email to the specified recipient.

Mandrill.sendPlaintextEmail({

apiKey: '1dTOFDXzJdU5cXiMNd6jRq',

toEmail: 'jane@example.com',

toName: 'Jane Doe',

subject: 'Welcome, Jane!',

message: 'Jane,\nThanks for joining our community. If you have any questions, please don\'t hesitate to send them our way. Feel free to reply to this email directly.\n\nSincerely,\nThe Management',

fromEmail: 'harold@example.enterprise',

fromName: 'Harold Greaseworthy',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

apiKey required

A valid Mandrill API key.

'1dTOFDXzJdU5cXiMNd6jRq'
toEmail required

Email address of the primary recipient.

'jane@example.com'
toName

Full name of the primary recipient.

'Jane Doe'
subject

Subject line for the email.

'Welcome, Jane!'
message

The plaintext body of the email.

'Jane,\nThanks for joining our community.  If you have any questions, please don\'t hesitate to send them our way.  Feel free to reply to this email directly.\n\nSincerely,\nThe Management'
fromEmail

Email address of the sender.

'harold@example.enterprise'
fromName

Full name of the sender.

'Harold Greaseworthy'

Exits

error

An unexpected error occurred.

success

OK.

N/A