Problem Sending Activation Email

I have installed Discourse using the 1-click app install on DigitalOcean with LetsEncrypt HTTPS support. I’m not receiving the activation email on my admin email account. When I run ./discourse-doctor, on the Email Send step I get the following error:


I am hosting Discourse on a sub-domain, while my main site (main domain) & mail server are on Hostgator. The SPF and DKIM records are active on my main domain. I have configured Discourse mail send for the port 465, which is what my Hostgator mail servers support.

Could anyone shed some light on what could be going wrong?

Thanks in advance.

Edit: When I try port 587 ./discourse-doctor gives a different error given below:

Sending mail failed.

Update: I got the activation email working using the port 587 and using the following value in app.yaml file:


Once I logged into the admin interface I could see the following Sidekiq errors (from before?):

Jobs::HandledExceptionWrapper: Wrapped OpenSSL::SSL::SSLError: hostname “” does not match the server certificate

Now, I understand that this error went away because I set the DISCOURSE_SMTP_ENABLE_START_TLS to false, but is this the right way to do things?

Hi and welcome to meta @nparab :wave:

I’m afraid we can’t support the one-click install offered by DigitalOcean because it’s not the officially endorsed way to set up Discourse. I strongly recommend that you follow our official installation guide.

1 Like

That message is self explanatory and means that your mail server is misconfigured.

1 Like

But if I connect via this command:

openssl s_client -starttls smtp -crlf -connect

it connects properly and I can even send emails. If the mail server was misconfigured then this command also shouldn’t work, right?

Update: On executing this command:

openssl s_client -servername -starttls smtp -crlf -connect

it returns a certificate for instead of the certificate for

Is this the misconfiguration you were talking about?

For the moment, I have configured Discourse to use this (instead of as the DISCOURSE_SMTP_ADDRESS in the app.yml file, so that the certificates match. Will this cause any problems?