# SMTP error: Must issue a STARTTLS command first

**URL:** <https://meta.discourse.org/t/smtp-error-must-issue-a-starttls-command-first/181050>\
**Category:** Self-hosting\
**Created:** [February 24, 2021, 9:16pm UTC](https://meta.discourse.org/t/smtp-error-must-issue-a-starttls-command-first/181050 "2021-02-24T21:16:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![blsrds](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blsrds/32/211062_2.png) [@blsrds](https://meta.discourse.org/u/blsrds)\
**Post date:** [February 24, 2021, 9:16pm UTC](https://meta.discourse.org/t/smtp-error-must-issue-a-starttls-command-first/181050/1 "2021-02-24T21:16:33Z")

</div>

I am trying to configure Discourse 2.7.0.beta4 with the Mailersend SMTP service.

After running `./discourse-doctor` I got the error below.

> SMTP error: Must issue a STARTTLS command first

This is my current **app.yml** configuration regarding SMTP.

```
  DISCOURSE_SMTP_ADDRESS: 'smtp.mailersend.net'
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: username@subdomain.domain.org
  DISCOURSE_SMTP_PASSWORD: mypasswordhere
 #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
 #DISCOURSE_SMTP_AUTHENTICATION: login
 #DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

```

I’ve already tried to uncomment and set `DISCOURSE_SMTP_ENABLE_START_TLS` explicitly as true, but the error remains. The same for `DISCOURSE_SMTP_AUTHENTICATION: login`.

After any change in the YML file I am restarting the system with this:

`./launcher destroy app; ./launcher start app`

Any tip about what is going on?

Thanks in advance!

---

_[View the full topic](https://meta.discourse.org/t/smtp-error-must-issue-a-starttls-command-first/181050)._
