2.0.8 • Published 7 years ago

shnappy-emailer v2.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

shnappy-emailer

Send emails via Mandrill. Saves you having to setup the whole email object each time.

History

2.0.1 - Breaking changes. Moved from Mandrill to SparkPost to avoid Mandrill price hike.

1.0.0 - Breaking changes. Introduced options to allow sending from another email than in config

0.0.1 - Initial release.

Installing

npm install shnappy-emailer --save

Sample

var emailer = require('shnappy-emailer');

var message = {
    subject: 'Test',
    html: '<p>Hi</p>',
    text: 'Hi',
    to: {
        name: 'Daniel',
        email: 'daniel@shnappy.com'
    }
}

// These are all optional. Most values will read from config if not provided.
var options = {
    from: {
        name: 'Test',
        email: 'test@example.com'
    },
    replyTo: 'replyto@example.com',
    sendAt: new Date().toISOString()
};

emailer.SendEmail(to, 'Subject', message, function(data){
    // Check data to see if it worked.
});

Methods

SendEmail(messageObject, options, callback)

SendEmail(messageObject, callback)

2.0.8

7 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago