# Reworking the emails:test rake task output

**URL:** https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286
**Category:** Development
**Created:** [October 31, 2025, 3:54pm UTC](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286 "2025-10-31T15:54:44Z")
**Posts on this page:** 4
**Page:** 2

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [December 23, 2025, 5:09pm UTC](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286/21 "2025-12-23T17:09:54Z")

</div>

Yes.

But regardless, it would have worked. Without touching anything, STARTTLS would only be used if the server offered it.

The _only_ situation where it ever needed to be explicitly disabled was where:

- the server offers STARTTLS
- mail sent WITHOUT using STARTTLS would work
- mail sent WITH STARTTLS would fail

---

<div class="post-metadata">

### Author: ![torgeirl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/torgeirl/32/519857_2.png) [@torgeirl](https://meta.discourse.org/u/torgeirl)
#### Post date: [February 6, 2026, 8:38am UTC](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286/22 "2026-02-06T08:38:18Z")

</div>

> [@supermathie](#):
>
> I imagine there’s at least one self-hoster out there who has set this but doesn’t need it and is actually relying on STARTTLS.

Probably true for most.

For us, we actually rely on an old email solution that doesn’t use STARTTLS for outgoing emails from internal systems (that is handled later in the chain) and since the documentation said `DISCOURSE_SMTP_ENABLE_START_TLS` is optional, but default true we sat this to false intentionally.

I can Dismiss this advise, but it just shows up again and other admins will wonder if there is something wrong with out setup (there isn’t; test mail works fine!). Is the advise intended to be so persistent?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 6, 2026, 8:01pm UTC](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286/23 "2026-02-06T20:01:06Z")

</div>

> [@torgeirl](#):
>
> and since the documentation said `DISCOURSE_SMTP_ENABLE_START_TLS` is optional, but default true we sat this to false intentionally

`DISCOURSE_SMTP_ENABLE_START_TLS` will only use STARTTLS if the server offers it. If your mailserver doesn’t offer it, it won’t be used.

(this is referred to as opportunistic TLS)

> [@torgeirl](#):
>
> Is the advise intended to be so persistent?

My reason for adding the warning is that prior to my change, setting `DISCOURSE_SMTP_ENABLE_START_TLS` to false _did not actually disable STARTTLS_.

I envisioned there was a non-zero number of admins who had no idea how this worked and banged together variables until it did and happened to leave `DISCOURSE_SMTP_ENABLE_START_TLS=false` set, even though their setup required it. The warning is largely directed at those people.

---

<div class="post-metadata">

### Author: ![torgeirl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/torgeirl/32/519857_2.png) [@torgeirl](https://meta.discourse.org/u/torgeirl)
#### Post date: [February 9, 2026, 9:16am UTC](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286/24 "2026-02-09T09:16:51Z")

</div>

> [@supermathie](#):
>
> `DISCOURSE_SMTP_ENABLE_START_TLS` will only use STARTTLS if the server offers it. If your mailserver doesn’t offer it, it won’t be used.

You’re right! I just tested and can confirm outbound email still works for us after the setting was removed. 👍

[Previous page](https://meta.discourse.org/t/reworking-the-emails-test-rake-task-output/387286.md?page=1)
