# voilab-send

> Library to send transactional emails

Latest version **1.5.4** (published 2019-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install voilab-send
pnpm add voilab-send
yarn add voilab-send
bun add voilab-send
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.4 |
| Published | 2019-12-16 |
| First published | 2016-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 44.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Voilab: Fabien Tafelmacher, Joël Poulin |
| Maintainers | karamasoff, tafel |
| Keywords | email, send, sendgrid, transactional |

## Links

- npm: https://www.npmjs.com/package/voilab-send
- Repository: https://github.com/voilab/voilab-send
- Homepage: https://github.com/voilab/voilab-send#readme
- Issues: https://github.com/voilab/voilab-send/issues
- npm.io page: https://npm.io/package/voilab-send

## Dependencies (3)

- [debug](https://npm.io/package/debug.md) ^4.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.10
- [bluebird](https://npm.io/package/bluebird.md) ^3.7.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.5.4 (latest) — 2019-12-16
- 1.5.3 — 2019-12-16
- 1.5.2 — 2019-12-16
- 1.5.1 — 2019-12-16
- 1.5.0 — 2019-09-10
- 1.4.0 — 2019-07-03
- 1.3.6 — 2019-05-24
- 1.3.5 — 2019-03-26
- 1.3.4 — 2019-03-26
- 1.3.3 — 2019-03-25
- 1.3.2 — 2019-01-09
- 1.3.1 — 2018-12-14
- 1.3.0 — 2018-12-04
- 1.2.1 — 2018-11-12
- 1.2.0 — 2018-09-14
- … 7 more at https://npm.io/package/voilab-send/versions

## README

# voilab-send
Transactional mailer

## Basic usage
```js
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
```js
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
```js
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.*`

---
_Source: https://npm.io/package/voilab-send · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
