# loopback-connector-mailjet

> Loopback connector module which allow to send emails via Mailjet

Latest version **1.0.6** (published 2016-12-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install loopback-connector-mailjet
pnpm add loopback-connector-mailjet
yarn add loopback-connector-mailjet
bun add loopback-connector-mailjet
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2016-12-29 |
| First published | 2016-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Younes Benaomar |
| Maintainers | interactive-object |
| Keywords | loopback, mailjet, connector |

## Links

- npm: https://www.npmjs.com/package/loopback-connector-mailjet
- Repository: https://github.com/InteractiveObject/loopback-connector-mailjet
- Issues: https://github.com/InteractiveObject/loopback-connector-mailjet/issues
- npm.io page: https://npm.io/package/loopback-connector-mailjet

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.6.1
- [node-mailjet](https://npm.io/package/node-mailjet.md) ^3.0.6

## 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.6 (latest) — 2016-12-29
- 1.0.5 — 2016-12-29
- 1.0.4 — 2016-12-20
- 0.0.3 — 2016-12-14
- 0.0.2 — 2016-11-23

## README

## loopback-connector-mailjet

Loopback connector module which allow to send emails via Mailjet.

## 1. Installation

````sh
npm install loopback-connector-mailgun --save
````

## 2. Configuration

datasources.json

    {
        "mailjet": {
            "connector": "loopback-connector-mailjet",
            "apiKey": "${MAILJET_API_KEY}",
            "apiSecret":"${MAILJET_API_SECRET}"
        }
    }

model-config.json

    {
        "Email": {
            "dataSource": "mailjet",
            "public": false
        }
    }

Additionaly you can set defaults

    {
        "mailgun": {
            "connector": "loopback-connector-mailgun",
            "apikey": "[your api key here]",
            "default": {
                "fromEmail": "contact@interactive-object.com",
                "fromName": "Anna"
            }
            
        }
    }

## 3. Use

Basic option same as built in Loopback. Returns a Promise

    loopback.Email.send({
        to: "to@to.com",
        from: "fron@from.com",
        subject: "subject",
        text: "text message",
        html: "html <b>message</b>",
        headers : {
            "X-My-Header" : "My Custom header"
        }
    })
    .then(function(response){})
    .catch(function(err){});


Basic option for templates

    loopback.Email.send({
        to: "to@to.com",
        from: "fron@from.com",
        subject: "subject",
        templateId: "11111",
        templateVars: {
          "VAR": "VALUE"
        }
    })
    .then(function(response){})
    .catch(function(err){});

## License
Copyright (c) 2016 [Interactive Object](https://www.interactive-object.com) . Licensed under the MIT license.

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