From 055cd331d9b0ab6de84b713505b2f3ddef0a68d0 Mon Sep 17 00:00:00 2001 From: nichols-green <82182892+nichols-green@users.noreply.github.com> Date: Fri, 11 Jun 2021 09:48:22 -0700 Subject: [PATCH] Added support for nodemailer ignoreTLS option (#6216) * added support for nodemailer ignoreTLS option * update doc to show no default value --- api/example.env | 1 + api/src/mailer.ts | 1 + docs/reference/environment-variables.md | 17 +++++++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/api/example.env b/api/example.env index 86ca3ffe95..9249c9483c 100644 --- a/api/example.env +++ b/api/example.env @@ -143,6 +143,7 @@ EMAIL_SENDMAIL_PATH="/usr/sbin/sendmail" # EMAIL_SMTP_HOST="localhost" # EMAIL_SMTP_PORT=465 # EMAIL_SMTP_SECURE=false # Use TLS +# EMAIL_SMTP_IGNORE_TLS=false # EMAIL_SMTP_USER="username" # EMAIL_SMTP_PASSWORD="password" diff --git a/api/src/mailer.ts b/api/src/mailer.ts index 9a664e6d08..1b62abb55d 100644 --- a/api/src/mailer.ts +++ b/api/src/mailer.ts @@ -28,6 +28,7 @@ export default function getMailer(): Transporter { host: env.EMAIL_SMTP_HOST, port: env.EMAIL_SMTP_PORT, secure: env.EMAIL_SMTP_SECURE, + ignoreTLS: env.EMAIL_SMTP_IGNORE_TLS, auth: auth, } as Record); } else if (env.EMAIL_TRANSPORT.toLowerCase() === 'mailgun') { diff --git a/docs/reference/environment-variables.md b/docs/reference/environment-variables.md index 03dd8a55bf..2334a1db67 100644 --- a/docs/reference/environment-variables.md +++ b/docs/reference/environment-variables.md @@ -310,14 +310,15 @@ Based on the `EMAIL_TRANSPORT` used, you must also provide the following configu ### SMTP (`smtp`) -| Variable | Description | Default Value | -| --------------------- | ---------------- | ------------- | -| `EMAIL_SMTP_HOST` | SMTP Host | -- | -| `EMAIL_SMTP_PORT` | SMTP Port | -- | -| `EMAIL_SMTP_USER` | SMTP User | -- | -| `EMAIL_SMTP_PASSWORD` | SMTP Password | -- | -| `EMAIL_SMTP_POOL` | Use SMTP pooling | -- | -| `EMAIL_SMTP_SECURE` | Enable TLS | -- | +| Variable | Description | Default Value | +| ----------------------- | ---------------- | ------------- | +| `EMAIL_SMTP_HOST` | SMTP Host | -- | +| `EMAIL_SMTP_PORT` | SMTP Port | -- | +| `EMAIL_SMTP_USER` | SMTP User | -- | +| `EMAIL_SMTP_PASSWORD` | SMTP Password | -- | +| `EMAIL_SMTP_POOL` | Use SMTP pooling | -- | +| `EMAIL_SMTP_SECURE` | Enable TLS | -- | +| `EMAIL_SMTP_IGNORE_TLS` | Ignore TLS | -- | ### Mailgun (`mailgun`)