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: '[email protected]mple.com',

toName: 'Jane Doe',

subject: 'Welcome, Jane!',

message: 'Jane,\n' + "Thanks 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" + '\n' + 'Sincerely,\n' + 'The Management',

fromEmail: '[email protected]',

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.

'[email protected]'
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,\n' +
  "Thanks 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" +
  '\n' +
  'Sincerely,\n' +
  'The Management'
fromEmail

Email address of the sender.

'[email protected]'
fromName

Full name of the sender.

'Harold Greaseworthy'

Exits

error

An unexpected error occurred.

success

OK.

N/A