# enveloop

> This package provides a wrapper for the Envelope API.

Latest version **0.2.2** (published 2024-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install enveloop
pnpm add enveloop
yarn add enveloop
bun add enveloop
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2024-04-09 |
| First published | 2022-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ben Wyrosdick |
| Maintainers | benwyrosdick |
| Keywords | enveloop, api |

## Links

- npm: https://www.npmjs.com/package/enveloop
- Repository: https://github.com/enveloophq/enveloop-node
- Homepage: https://github.com/enveloophq/enveloop-node#readme
- Issues: https://github.com/enveloophq/enveloop-node/issues
- npm.io page: https://npm.io/package/enveloop

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ~2

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 0.2.2 (latest) — 2024-04-09
- 0.2.1 — 2023-11-13
- 0.2.0 — 2023-11-13
- 0.1.7 — 2023-03-17
- 0.1.6 — 2023-02-28
- 0.1.5 — 2022-12-10
- 0.1.4 — 2022-10-25
- 0.1.3 — 2022-10-19
- 0.1.2 — 2022-10-06
- 0.1.1 — 2022-10-06
- 0.1.0 — 2022-10-06

## README

# Enveloop

enveloop-js is a node wrapper for the Enveloop API. It allows easy use of the API to send messages.

## Installation

Add via Yarn:

```
yarn add 'enveloop'
```

Add via NPM:

```
npm install --save 'enveloop'
```

## Usage

Setup the client connection:

```js
const { Enveloop } = require('enveloop')
const enveloop = new Enveloop({ apiKey: process.env.ENVELOOP_API_TOKEN })
```

Send a message:

```js
enveloop.sendMessage({
  template: 'welcome-email',
  to: 'user@email.com',
  from: 'welcome@myapp.com',
  subject: 'Welcome to MyApp',
  templateVariables: {
    first_name: 'John',
  }
)
.then(res => console.log(res))
.catch(err => console.log(err))
```

Get information about a template (variables and body html):

```js
enveloop.templateInfo({ template: 'welcome-email' })
.then(res => console.log(res))
.catch(err => console.log(err))
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/enveloophq/enveloop-js. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/enveloophq/enveloop-js/blob/master/CODE_OF_CONDUCT.md).

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Enveloop project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/enveloophq/enveloop-js/blob/master/CODE_OF_CONDUCT.md).

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