adonis-sendgrid-mail
v1.0.0
Published
AdonisJS SendGrid mail service provider
Downloads
223
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_KEY
property in.env
file.
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 explicitfrom
property in mail data object.