Send emails using Mailgun
Send emails using Mailgun
- From the right side, select
Sending
>Domain Settings
> Add a new SMTP user. This will be youruser
andpass
.
Initialize Candymail config with Mailgun STMP.
candymail.init(automation.workflows, {
mail: {
host: 'smtp.mailgun.org',
port: 465,
secure: true,
auth: {
user: process.env.MAIL_USER,
pass: process.env.MAIL_PASSWORD,
},
tls: {
rejectUnauthorized: true,
},
},
hosting: { url: process.env.HOSTING_URL },
db: { reset: true },
debug: { trace: true },
})