Troubleshoot email on a new Discourse install

Hi Discourse people!

I have fought for several days with setting the emails parameters with port 465, and the solution is not here nor in any post I read on the forum (and I have really dug).

Of course it is a matter of what your mail server accepts. In my case, only 465 over TLS.

The two required config lines to add in app.yml are:

DISCOURSE_SMTP_FORCE_TLS: true
DISCOURSE_SMTP_ENABLE_START_TLS: false
Some details

Default settings resulted in a Net::ReadTimeout error when trying a test email with discourse-doctor. Sending test emails from within the container work fine with e.g. curl, exactly as in this post which led me to half of the solution: Cannot send email - problem with port 465 - #10 by schungx

I could only find out about the second setting after looking at app.yml content and modifying this parameter. I have the feeling that most programs (eg. Thunderbird) implicitly set the correct protocol when selecting port 465, so maybe Discourse should? This seems to be really standard, also as highlighted here:

(link to full post)

So I would really vouch for updating the section of this guide about port 465 or make discourse-setup automatically choose the best setting.