# email-engine

> Email Engine

Latest version **1.1.6** (published 2019-09-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install email-engine
pnpm add email-engine
yarn add email-engine
bun add email-engine
```

## 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.1.6 |
| Published | 2019-09-03 |
| First published | 2018-11-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Muzammil Bilwani |
| Maintainers | bilwani12 |
| Keywords | email, Send Grid, Mail sender, Mailgun |

## Links

- npm: https://www.npmjs.com/package/email-engine
- Repository: https://github.com/Muzammil-Bilwani/email-engine
- Homepage: https://github.com/Muzammil-Bilwani/email-engine#readme
- Issues: https://github.com/Muzammil-Bilwani/email-engine/issues
- npm.io page: https://npm.io/package/email-engine

## Dependencies (2)

- [mailgun-js](https://npm.io/package/mailgun-js.md) ^0.22.0
- [@sendgrid/mail](https://npm.io/package/@sendgrid/mail.md) ^6.3.1

## 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.1.6 (latest) — 2019-09-03
- 1.1.5 — 2019-05-25
- 1.1.4 — 2019-05-25
- 1.1.3 — 2019-05-25
- 1.1.2 — 2019-05-25
- 1.1.1 — 2019-01-11
- 1.1.0 — 2019-01-10
- 1.0.6 — 2018-11-21
- 1.0.5 — 2018-11-21
- 1.0.4 — 2018-11-21
- 1.0.3 — 2018-11-21
- 1.0.2 — 2018-11-21
- 1.0.1 — 2018-11-21
- 1.0.0 — 2018-11-21

## README

# Email Engine
A simple engine who sets your API key and send mail for different platform like [SendGrid](https://sendgrid.com/),[Mailgun](https://www.mailgun.com/), [AWS-SES](https://aws.amazon.com/ses/) etc

## How to Use

    npm install email-engine --save

Set your respective API key


### For Mailgun 

```javascript
const emailEngine = require('email-engine');
emailEngine.setKey(process.env.YOUR_API_KEY, 'MAIL_GUN', process.env.DOMAIN);
```

### For Send Grid 

 - Set your API KEY ([API KEYS](https://app.sendgrid.com/settings/api_keys))

```javascript
const emailEngine = require('email-engine');
emailEngine.setKey(process.env.YOUR_API_KEY, 'SEND_GRID');
```

 - Send Mails

```javascript
to = "anymail@anydomain.com";
subject = "any subject";
html = "any html or your html template";
from = "anymail@anydomain.com"
emailEngine.sendMailFromSendGrid(to, subject, html,from);
```

 - For Declaring From constant
 
```javascript
emailEngine.setFromMail('anymail@anydomain.com');
```

*Now you would not pass from mail in sending mail.*

**Happy Coding** 

##Future plans
- Adding AWS-SES
- Testing
- Multiple Mails 
- Cron Mails

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