# bs-mailgun

> BuckleScript bindings for [mailgun.js](https://github.com/mailgun/mailgun-js)

Latest version **0.0.2** (published 2017-12-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install bs-mailgun
pnpm add bs-mailgun
yarn add bs-mailgun
bun add bs-mailgun
```

## 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.2 |
| Published | 2017-12-27 |
| First published | 2017-12-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Simon Thörnqvist |
| Maintainers | drowzy |
| Keywords | bucklescript, mailgun |

## Links

- npm: https://www.npmjs.com/package/bs-mailgun
- npm.io page: https://npm.io/package/bs-mailgun

## Dependencies (1)

- [mailgun.js](https://npm.io/package/mailgun.js.md) ^2.0.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

- 0.0.2 (latest) — 2017-12-27
- 0.0.1 — 2017-12-27

## README

# bs-mailgun

BuckleScript bindings for [mailgun.js](https://github.com/mailgun/mailgun-js)

Status: Very basic, need driven.

## Example
```reason
let key = Js.Dict.unsafeGet(Node.Process.process##env, "MAILGUN_API_KEY");
let domain = Js.Dict.unsafeGet(Node.Process.process##env, "MAILGUN_DOMAIN");
let mg = Mailgun.make({"username": "api", "key": key});

let message = {
  "from": "Excited User <mailgun@sandbox-123.mailgun.org>",
  "to": [|"recipient@mail.com"|],
  "subject": "Hello",
  "text": "Testing some Mailgun awesomness!",
  "html": "<h1>Testing some Mailgun awesomness!</h1>"
};

Mailgun.sendMessage(mg, "sandbox-123.mailgun.org", message)
  |> Js.Promise.then_(msg => Js.log(msg) |> Js.Promise.resolve)
  |> Js.Promise.catch(err => Js.log(err) |> Js.Promise.resolve);
```

## Installation

```
npm i --save bs-mailgun
```
Add bs-mailgun to bs-dependencies in your bsconfig.json:

```
{
  ...
  "bs-dependencies": ["bs-mailgun"]
}
```

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