# Problem with email on non-default SMTP port

**URL:** https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122
**Category:** Self-hosting
**Created:** [May 12, 2016, 2:35pm UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122 "2016-05-12T14:35:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![peercafe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peercafe/32/55949_2.png) [@peercafe](https://meta.discourse.org/u/peercafe)
#### Post date: [May 12, 2016, 2:35pm UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122/1 "2016-05-12T14:35:30Z")

</div>

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 [https://meta.discourse.org/t/activation-email-not-being-sent-not-sure-whats-gone-wrong/32968/10](https://meta.discourse.org/t/activation-email-not-being-sent-not-sure-whats-gone-wrong/32968/10) 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:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/6/16009a89f5e2a998098e71542e793499ad8be4be.JPG)

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:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/9/e91a197d02b74604e60129d542c58f1e70221b77.JPG)

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 mail.privateemail.com 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?

---

<div class="post-metadata">

### Author: ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)
#### Post date: [May 12, 2016, 7:40pm UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122/2 "2016-05-12T19:40:57Z")

</div>

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 `privateemail.com` 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.

---

<div class="post-metadata">

### Author: ![peercafe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peercafe/32/55949_2.png) [@peercafe](https://meta.discourse.org/u/peercafe)
#### Post date: [May 12, 2016, 8:50pm UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122/3 "2016-05-12T20:50:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![peercafe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peercafe/32/55949_2.png) [@peercafe](https://meta.discourse.org/u/peercafe)
#### Post date: [May 12, 2016, 9:14pm UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122/4 "2016-05-12T21:14:01Z")

</div>

Thanks @DeanMarkTaylor You solved my problem.  
Cheers,

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 13, 2016, 9:17am UTC](https://meta.discourse.org/t/problem-with-email-on-non-default-smtp-port/44122/5 "2016-05-13T09:17:18Z")

</div>

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