Comment on page
Send emails using Gmail
Send emails using Gmail
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.
- 1.
- 2.Your user will be your email and password will be the App Password
- 1.
- 2.Your user will be your email and password will be your usual login password
Initialize Candymail config with Gmail STMP. The
user
is your Gmail email address and the pass
is the App Password you just generated.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 },
})
Create a
.env
:Last modified 1yr ago