# Troubleshoot email on a new Discourse install

**URL:** https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326
**Category:** Self-Hosting
**Tags:** email, configuring, how-to
**Created:** [June 7, 2014, 10:38pm UTC](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326 "2014-06-07T22:38:50Z")
**Posts on this page:** 1
**Showing post:** 546

<div class="post-metadata">

### Author: ![Guilllouv](https://avatars.discourse-cdn.com/v4/letter/g/d78d45/32.png) [@Guilllouv](https://meta.discourse.org/u/Guilllouv)
#### Post date: [October 11, 2024, 8:12am UTC](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/546 "2024-10-11T08:12:13Z")

</div>

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:

```plaintext
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](https://meta.discourse.org/t/cannot-send-email-problem-with-port-465/246004/10)

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:

> [@Sending email failed with SMTPS port 465](https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787/14):
>
> And upon reading the [actual RFC from 2018](https://www.rfc-editor.org/rfc/rfc8314#section-3.3) it’s clear – it’s not that STARTTLS is the way forward, it’s that SMTPS is _not_ the way forward, and implicit TLS over port 465 (or 587) is what administrators should choose going forward.
> 
> Supporting TLS over 465 should not be classed (and likely de-prioritized) as “maintaining backwards compatibility” or any similar notion.

([link](https://meta.discourse.org/t/sending-email-failed-with-smtps-port-465/65787/14) 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.

---

_[View the full topic](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326)._
