# sendgrid-promise

> Simple promise wrapper around the official sendgrid module

Latest version **1.0.1** (published 2016-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install sendgrid-promise
pnpm add sendgrid-promise
yarn add sendgrid-promise
bun add sendgrid-promise
```

## 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.0.1 |
| Published | 2016-05-12 |
| First published | 2016-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Paulo Vieira |
| Maintainers | paulovieira |
| Keywords | sendgrid |

## Links

- npm: https://www.npmjs.com/package/sendgrid-promise
- Repository: https://github.com/paulovieira/sendgrid-promise
- Homepage: https://github.com/paulovieira/sendgrid-promise#readme
- Issues: https://github.com/paulovieira/sendgrid-promise/issues
- npm.io page: https://npm.io/package/sendgrid-promise

## Dependencies (3)

- [bluebird](https://npm.io/package/bluebird.md) ^3.3.5
- [sendgrid](https://npm.io/package/sendgrid.md) ^2.0.0
- [find-up-sync](https://npm.io/package/find-up-sync.md) ^1.0.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.0.1 (latest) — 2016-05-12
- 1.0.0 — 2016-05-12

## README

# sendgrid-promise

### Description

Simple promise wrapper around the [official](https://github.com/sendgrid/sendgrid-nodejs) sendgrid module (using Bluebird).

Some functionality has been added by monkey-patching the `toWebFormat` method, namely the `ccname` and `bccname` fields (which are [documented in the web api](https://sendgrid.com/docs/API_Reference/Web_API/mail.html) but missing [in the official module](https://github.com/sendgrid/sendgrid-nodejs#available-params)).

This module will export an instance of the sendgrid object ready to be used. This instance can be reused everywhere in your application (since nodejs modules are [cached](https://nodejs.org/api/modules.html#modules_caching) after the first time they are loaded).

The API key is expected to be present in a text file located in `$PROJECT_ROOT/config/sendgrid-key.txt` (instead of the API key it can also be the user/password credentials, each in separate lines). See the example.

### Install

```sh
npm install --save sendgrid-promise
```

### Example

See `send-example.js`.

### Notes

If you just want to send simple plain-text emails it's a good idea to change some of the default settings in the sendgrid dashboard: 

1. go to `settings -> tracking`
2. make sure the following options are off: `click tracking` and `open tracking`

If not sendgrid will automatically create an html version of the email containing a hidden 1px image. In a gmail account (and likely in others) that tiny pixel will result in this undesirable message being displayed:

> "images are not displayed. Click to display images"

The user will click but nothing is shown...

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