# nodemailer-sendgridv3-transport

> SendGrid's Web API v3 transport for Nodemailer

Latest version **0.0.5** (published 2017-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install nodemailer-sendgridv3-transport
pnpm add nodemailer-sendgridv3-transport
yarn add nodemailer-sendgridv3-transport
bun add nodemailer-sendgridv3-transport
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-09-11 |
| First published | 2017-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fernando Diaz Laclaustra |
| Maintainers | pekebuda |
| Keywords | Nodemailer, SendGrid |

## Links

- npm: https://www.npmjs.com/package/nodemailer-sendgridv3-transport
- Repository: https://github.com/pekebuda/nodemailer-sendgridv3-transport
- Homepage: https://github.com/pekebuda/nodemailer-sendgridv3-transport#readme
- Issues: https://github.com/pekebuda/nodemailer-sendgridv3-transport/issues
- npm.io page: https://npm.io/package/nodemailer-sendgridv3-transport

## Dependencies (1)

- [sendgrid](https://npm.io/package/sendgrid.md) ^2.0.0

## 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

- 0.0.5 (latest) — 2017-09-11
- 0.0.4 — 2017-09-08
- 0.0.3 — 2017-09-08
- 0.0.2 — 2017-09-08
- 0.0.1 — 2017-08-12

## README

# nodemailer-sendgridv3-transport

Sendgrid Web API v3 transport for nodemailer

This module is a transport plugin for [Nodemailer](https://github.com/andris9/Nodemailer) 
that makes it possible to send through [SendGrid's v3 Web API](https://sendgrid.com/docs/API_Reference/api_v3.html) 
using brand new [Sendgrid SDK](https://github.com/sendgrid/sendgrid-nodejs/tree/master/packages/mail) 
for NodeJS, particularly its [mail API](https://github.com/sendgrid/sendgrid-nodejs).




## Important notice 

Contrary to what is stated in de description, currently this library is based on 
Sendgrid's [npm library v2.X.X](https://github.com/sendgrid/sendgrid-nodejs/tree/v2.0.0)



## Usage
Install via npm.

	npm install nodemailer-sendgridv3-transport

Require the module and initialize it with your SendGrid credentials.

```javascript
var nodemailer = require('nodemailer');
var sgTransport = require('nodemailer-sendgridv3-transport');

// api key https://sendgrid.com/docs/Classroom/Send/api_keys.html
var options = {
	auth: {
		api_key: 'SENDGRID_APIKEY'
	}
}

// or

// username + password
var options = {
	auth: {
		api_user: 'SENDGRID_USERNAME',
		api_key: 'SENDGRID_PASSWORD'
	}
}
	
var mailer = nodemailer.createTransport(sgTransport(options));
```

Note: We suggest storing your SendGrid username and password as enviroment variables.

Create an email and send it off!

```javascript
var email = {
	to: ['joe@foo.com', 'mike@bar.com'],
	from: 'roger@tacos.com',
	subject: 'Hi there',
	text: 'Awesome sauce',
	html: '<b>Awesome sauce</b>'
};

mailer.sendMail(email, function(err, res) {
		if (err) console.log(err) 
		console.log(res);
	}
);
```




## Deploying

* Confirm tests pass
* Bump the version in `README.md`, `package.json`, `test/main.js`
* Update `CHANGELOG.md`
* Confirm tests pass
* Commit `Version bump vX.X.X`
* `npm publish`
* Push changes to GitHub
* Release tag on GitHub `vX.X.X`




## Credits 

Based on the library [nodemailer-sendgrid-transport](https://github.com/sendgrid/nodemailer-sendgrid-transport) 
by [SendGrid](https://sendgrid.com/).




## License
Licensed under the MIT License.

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