Well, to start off, this is production, and I can’t get the first registration email to send.
I am sure my SMTP settings are correct.
I am able to ping and telnet my mail server with the port used, but as soon as i do “EHLO mailserver” the connection is closed by the foreign host.
At the tail of my logs, it says:
Rendering layouts/email_template.html.erb
Rendered layouts/email_template.html.erb (Duration: 0.2ms | Allocations: 32)
Delivered mail f3853b94-b772-48c2-b1b7-a78bbcbfc5c1@discourse.mywebsite.com (60177.6ms)
Job exception: Net::ReadTimeout
And I tried ensuring my SMTP settings were correct so I ran /var/discourse/discourse-doctor, but it cannot validate my settings. It says:
==================== YML SETTINGS ====================
awk: not an option: --field-separator=:
DISCOURSE_HOSTNAME=
awk: not an option: --field-separator=:
SMTP_ADDRESS=
awk: not an option: --field-separator=:
DEVELOPER_EMAILS=
awk: not an option: --field-separator=:
SMTP_PASSWORD=
awk: not an option: --field-separator=:
SMTP_PORT=
awk: not an option: --field-separator=:
SMTP_USER_NAME=
awk: not an option: --field-separator=:
LETSENCRYPT_ACCOUNT_EMAIL=
But my YAML (./containers/app.yml
) seems perfectly formatted.
## TODO: The SMTP mail server used to validate new accounts and send notifications
# SMTP ADDRESS, username, and password are required
# WARNING the char '#' in SMTP password can cause problems!
DISCOURSE_SMTP_ADDRESS: mail.redacted.com
DISCOURSE_SMTP_PORT: 465
DISCOURSE_SMTP_USER_NAME: redacted@redacted.com
DISCOURSE_SMTP_PASSWORD: "redacted"
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
LETSENCRYPT_ACCOUNT_EMAIL: redacted@redacted.com