feat: Use SMTP_SECURE environment variable to force secure parameter of smtp configuration (#2214)

This commit is contained in:
Nainterceptor
2021-06-12 20:01:48 +02:00
committed by GitHub
parent d71f0ae6bd
commit 07b1811993

View File

@ -173,7 +173,10 @@ export class Mailer {
let smtpConfig = {
host: process.env.SMTP_HOST,
port: process.env.SMTP_PORT,
secure: process.env.NODE_ENV === "production",
secure:
"SMTP_SECURE" in process.env
? process.env.SMTP_SECURE === "true"
: process.env.NODE_ENV === "production",
auth: undefined,
};