adonis-sendgrid-mail
v1.0.0
Published
AdonisJS SendGrid mail service provider
Readme
AdonisJS SendGrid Mail Service
Getting Started
- Install with package manager:
npm i --save adonis-sendgrid-mail - Copy configuration file:
cp node_modules/adonis-sendgrid-mail/config/sendgrid.js config/sendgrid.js - Set
SENDGRID_API_KEYproperty in.envfile.
Usage
This service exposes the same send and sendMultiple methods as @sendgrid/mail package.
const SendGrid = use("Adonis/Addons/SendGrid")
SendGrid.send(mailData)
.then(...)
.catch(...)Configuration
You can find following configuration options in config/sendgrid.js:
substitutionWrappers- Which substitution wrappers to use by default.senderEmail- Default email address to send from. Can be overridden with explicitfromproperty in mail data object.
