1.5.4 • Published 4 years ago

voilab-send v1.5.4

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

voilab-send

Transactional mailer

Basic usage

var mailer = new (require('voilab-send'))({
    adapter: 'some-adapter',
    adapterConfig: {
        someData: 'someConfig'
    }
});

mailer.getAdapter()
    .setFrom('from@email.com')
    .addTo('to@email.co')
    .setSubject('A subject')
    .setHtml('<p>Hello -name-</p>')
    .addGlobalData('name', 'John');

mailer.send()
    .then(function () {
        console.log('mail is sent');
    })
    .catch(function (err) {
        console.log(err);
    });

Sendgrid V4

var mailer = new (require('voilab-send'))({
    adapter: 'sendgrid-v4',
    adapterConfig: {
        apikey: 'your-api-key',
        globalDataSurround: '-'
    }
});

Note that you'll need to add this dependency into your own package.json:

  • sendgrid version 5.*

Sparkpost V2

var mailer = new (require('voilab-send'))({
    adapter: 'sparkpost-v2',
    adapterConfig: {
        apikey: 'your-api-key'
    }
});

Note that you'll need to add these dependencies into your own package.json:

  • sparkpost version 2.*
1.5.4

4 years ago

1.5.3

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago