# @egomobile/api-messenger

> A client using an API to send messages, like emails.

Latest version **0.3.0** (published 2021-10-21) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @egomobile/api-messenger
pnpm add @egomobile/api-messenger
yarn add @egomobile/api-messenger
bun add @egomobile/api-messenger
```

## 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.3.0 |
| Published | 2021-10-21 |
| First published | 2021-10-13 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 2 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Next.e.GO Mobile SE, Aachen, Germany |
| Maintainers | mkloubertego, mkloubert, ekegodigital |
| Keywords | node, api, messenger, messages, email, mail, mailto, client, http, https, js, ts, javascript, typescript, ego |

## Links

- npm: https://www.npmjs.com/package/@egomobile/api-messenger
- Repository: https://github.com/egomobile/node-api-messenger
- Homepage: https://github.com/egomobile/node-api-messenger#readme
- Issues: https://github.com/egomobile/node-api-messenger/issues
- npm.io page: https://npm.io/package/@egomobile/api-messenger

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.23.0
- [@types/node](https://npm.io/package/@types/node.md) ^12.20.33

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.3.0 (latest) — 2021-10-21
- 0.2.1 — 2021-10-14
- 0.2.0 — 2021-10-14
- 0.1.1 — 2021-10-13
- 0.1.0 — 2021-10-13

## README

[![npm](https://img.shields.io/npm/v/@egomobile/api-messenger.svg)](https://www.npmjs.com/package/@egomobile/api-messenger)
[![last build](https://img.shields.io/github/workflow/status/egomobile/node-api-messenger/Publish)](https://github.com/egomobile/node-api-messenger/actions?query=workflow%3APublish)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/egomobile/node-api-messenger/pulls)

# @egomobile/api-messenger

> A client using an API to send messages, like emails, written in [TypeScript](https://www.typescriptlang.org/).

## Install

Execute the following command from your project folder, where your `package.json` file is stored:

```bash
npm install --save @egomobile/api-messenger
```

## Usage

```typescript
import createApiMessenger from "@egomobile/api-messenger";

async function main() {
  const messenger = createApiMessenger({
    baseURL: "https://api.example.com/",
    auth: {
      clientId: "<YOUR-CLIENT-ID>",
      clientSecret: "<YOUR-CLIENT-SECRET>",
    },
  });

  const result = await messenger.sendMessages({
    message: {
      content: "PGI+TG9yZW0gaXNwdW0hPC9iPg==",
      content_type: "text/html",
    },
    subject: "Lorem ipsum",
    to: ["mailto:test2@example.com", "mailto:test2@example.com"],
  });

  console.log(result);
}

main().catch(console.error);
```

## Documentation

The API documentation can be found [here](https://egomobile.github.io/node-api-messenger/).

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