loopback-sendgrid-connector
Simple Loopback connector for SendGrid Mail service. Inspired by loopback-connector-sendgrid
Installation
npm install loopback-sendgrid-connector --save
Documentation
Configuration
SendGrid API key
Three steps to add connector to your app:
- Get SendGrid API key,
- Add configutation to datasource.json,
- Add configuration to model-config.json
1. API key
You can get your SendGrid API key in your SendGrid Dashboard -> Settings -> API keys
2. datasource.json
or you can specify your env key, and connector will use this as api_key for Sendgrid
3. model-config.json
Usage
You can use callback (promises in future).
Simple usage:
loopbackEmail;
Advanced usage:
loopbackEmail;
Also you can specify TO field as an array to send email to multiple recipients:
to: "to1@test.com" "to2@test.com" "to3@test.com"
List of all options for SendGrid Mail API.
SendGrid send mail examples (most of them you can use in this connector)
In future
- Add promises support
- Write tests :)