JangoSMTP.sendHtmlEmail()

Send an html email.

Send an email using JangoSMTP's service. You can test the Jango API method here: http://api.jangomail.com/api.asmx?op=SendTransactionalEmail

Usage

Hover over inputs/exits for more info.

var JangoSMTP = require('machinepack-jangosmtp');


// Send an html email.

JangoSMTP.sendHtmlEmail({

username: '',

password: '',

toEmail: '[email protected]',

subject: 'Welcome, Jane!',

htmlMessage: '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',

textMessage: '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',

options: 'OpenTrack=True,ClickTrack=True,[email protected]',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Missing or incorrect username/password.

wrongOrNoUsernamePassword: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

username required

Your JangoSMTP username

''
password required

Your JangoSMTP password

''
toEmail required

Email address of the primary recipient.

'[email protected]'
subject required

Subject line for the email.

'Welcome, Jane!'
htmlMessage required

The html 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 required

Email address of the sender.

'[email protected]'
fromName required

Full name of the sender.

'Harold Greaseworthy'
textMessage

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'
options

Options string to set additional options.

'OpenTrack=True,ClickTrack=True,[email protected]'

Exits

error

An unexpected error occurred.

wrongOrNoUsernamePassword

Missing or incorrect username/password.

success

OK.