Problem with email on non-default SMTP port


Ok. I can’t get email to work with my Discourse install. I’ve got it setup on a DigitalOcean 2gb Droplet and the domain name is on Namecheap. I was able to do the workaround discribed in this post to gain access to finish setup and prep the site, but I still can’t figure out the email controls.

Below I’ve tried to provide as much info as possible for my setup. I’m hoping someone can find the issue so I can move on. Thanks in advance.

Here is my “app.yml” setup:

I run sudo ./launcher rebuild app whenever I change “app.yml”

Here is my Namecheap DNS record: redacted

Here is my DigitalOcean DNS record: redacted

Here is my log file from error when sending test email out of admin panel:

I’m using Namecheap private email for SMTP settings.

I can receive emails to hello(at)peer(dot)cafe so I think the Namecheap records are correct. I can run telnet 465 on my DO droplet and am connected. So I’m thinking the problem is either in my “app.yml” file or the DO records. Any thoughts?

(Dean Taylor) #2

I’m ignoring all the DNS stuff because that has nothing to do with connecting to a SMTP server hosted by someone else.

I think setting DISCOURSE_SMTP_ENABLE_START_TLS to false will solve the problem here.

Generally port 465 is TLS (otherwise known as SSL) - it doesn’t require the START_TLS as it’s already TLS.

You would set START_TLS to true if you were using port 26 (yes 26 perhaps 25 as well) with Namecheap’s service.

Also I believe Namecheap’s SMTP server is responding poorly here - it should be bailing out early and causing an error rather than holding the connection open and not responding - causing a “timeout”.

You would see a no peer certificate available or Secure Renegotiation IS NOT supported error, if both the server handled this correctly and there more verbose error logging here.


Thanks for the help. I tried just changing DISCOURSE_SMTP_ENABLE_START_TLS to false and I’m still getting no delivery. I’m going to try switching it to true and changing port to 26 to see if that will work.


Thanks @DeanMarkTaylor You solved my problem.

(Régis Hanol) #5

This topic was automatically closed after 12 hours. New replies are no longer allowed.