diff --git a/api/.env.git b/api/.env.git index abe2ced8..2c7dca5b 100644 --- a/api/.env.git +++ b/api/.env.git @@ -20,6 +20,9 @@ SEND_MAIL=yes # Details for the SMTP server designated for emails SMTP_HOST=localhost SMTP_PORT=25 +SMTP_USERNAME=smtp-user +SMTP_PASSWORD=smtp-password +SMTP_IGNORE_TLS=true # The URL pointing to this server HTTP_HOST=localhost diff --git a/api/src/utils/mailer.js b/api/src/utils/mailer.js index 8705b0dd..7223ba02 100644 --- a/api/src/utils/mailer.js +++ b/api/src/utils/mailer.js @@ -22,7 +22,11 @@ const mailer = nodemailer.createTransport({ host: process.env.SMTP_HOST, port: process.env.SMTP_PORT, secure: false, - ignoreTLS: true, + auth: { + user: process.env.SMTP_USERNAME, + pass: process.env.SMTP_PASSWORD, + }, + ignoreTLS: process.env.SMTP_IGNORE_TLS == "true", },{ from: "Boiler Books ", });