🚀 5 minutes tutorial
Mailing

Mailing

Mailing service is already made in the app/common/mail_service.ts file.

Setup your env file

Set your Mailgun API key OR your SMTP configuration in the .env file. You can't use both at the same time.

.env
MAILING_SERVICE=smtp
#OR
MAILING_SERVICE=mailgun

Then, setup your SMTP configuration if you use SMTP.

.env
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=

or setup your Mailgun configuration if you use Mailgun.

.env
MAILGUN_API_KEY=
MAILGUN_SENDER=

More information

See more on Mailing on AdonisJS (opens in a new tab)