Users discuss troubleshooting SMTP 587 port email errors during Discourse installation. Hyan notes that conflicting TLS settings — particularly DISCOURSE_SMTP_FORCE_TLS and DISCOURSE_SMTP_ENABLE_START_TLS — can cause errors like “TLS and STARTTLS are mutually exclusive” or “wrong version number”; setting DISCOURSE_SMTP_FORCE_TLS: false often resolves these. Another common issue is Net::SMTPAuthenticationError, which may stem from incorrect credentials or require setting DISCOURSE_SMTP_AUTHENTICATION: login. savionlee reports success with Mailgun by reversing those settings: DISCOURSE_SMTP_FORCE_TLS: true and DISCOURSE_SMTP_ENABLE_START_TLS: false, after encountering Net::ReadTimeout with ./discourse-doctor. They note the official troubleshooting guide didn’t help, but referenced threads — including one on port 465 issues — pointed them toward the correct configuration. ambimorph confirms that savionlee’s settings worked for them too, after a rebuild. The consensus suggests SMTP configuration is highly server-dependent, and default settings may need manual overrides — especially around TLS/STARTTLS — to resolve 587 port failures.
Different SMTP servers may occur different errors even with 587 port if testing with ./discourse-doctor
TLS and STARTTLS are mutually exclusive
This error has never mentioned in meta so far, you should set explicitly DISCOURSE_SMTP_FORCE_TLS: false otherwise it contradicts DISCOURSE_SMTP_ENABLE_START_TLS, as it is true by default. This may not always the case, but it’s worth a try.
SSL_connect returned=1 errno=0 peeraddr=xxx.xxx.xxx.xxx:587 state=error: wrong version number
Again, set DISCOURSE_SMTP_FORCE_TLS: false resolves the issue
Net::SMTPAuthenticationError this can be caused by wrong username password of your credentials you set or can be resolved by setting DISCOURSE_SMTP_AUTHENTICATION: login