-
Notifications
You must be signed in to change notification settings - Fork 23
Send emails using Gmail
Sukhpal Saini edited this page Jul 26, 2021
·
1 revision
Candymail supports all SMTP email services. Gmail is the easiest to set up since everyone has a Google Account.
Gmail should only be used for testing or debugging purposes. In production, consider using a service like Amazon SES, Sendgrid etc that offers SMTP for better deliverability.
- Sign up for an App Password for Gmail here
Initialize Candymail config with Gmail STMP. The user
is your Gmail email address and the pass
is the App Password you just geenrated.
candymail.init(automation.workflows, {
mail: {
host: 'smtp.gmail.com',
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 },
})