How to set up the SMTP settings?

Take Discourse out of the equation.

Does connecting to the mail server work from the server itself?