# Can't send email with certificate issue

**URL:** <https://meta.discourse.org/t/cant-send-email-with-certificate-issue/113207>\
**Category:** Self-hosting\
**Created:** [April 2, 2019, 8:35am UTC](https://meta.discourse.org/t/cant-send-email-with-certificate-issue/113207 "2019-04-02T08:35:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kyu](https://avatars.discourse-cdn.com/v4/letter/k/b3f665/32.png) [@kyu](https://meta.discourse.org/u/kyu)\
**Post date:** [April 2, 2019, 8:35am UTC](https://meta.discourse.org/t/cant-send-email-with-certificate-issue/113207/1 "2019-04-02T08:35:49Z")

</div>

Tried to setup discourse and have issue with email setup.  
I have [mail.mydomain.com](http://mail.mydomain.com) connected to a mail server configured in NAS with host name  
[smtp.myquickid.synology.me](http://smtp.myquickid.synology.me)  
I can send/receive mail [whatever@domain.com](mailto:whatever@domain.com) from thunderbird

So I setup discourse app.yml as below

```yaml
  DISCOURSE_SMTP_ADDRESS: smtp.myquickid.synology.me
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: admin@mydomain.com
  DISCOURSE_SMTP_PASSWORD: "plainpassword!"
  DISCOURSE_SMTP_ENABLE_START_TLS: false # (optional, default true)
  #DISCOURSE_SMTP_OPENSSL_VERIFY_MODE: none

```

Since I have issue with certificate, I set TLS to false however mail can’t be sent

```plaintext
$ tail /var/discourse/shared/standalone/log/rails/production.log shows
....
Sent mail to admin@mydomain.com (30.1ms)
Job exception: 530 5.7.0 Must issue a STARTTLS command first

```

I think this is caused by setting TLS to false.  
Also setting the port 25 gives same thing.

I did check both

```plaintext
$ telnet smtp.myquickid.synology.me 25
$ telnet smtp.myquickid.synology.me 587

```

all work fine.

How to solve this problem?

---

_[View the full topic](https://meta.discourse.org/t/cant-send-email-with-certificate-issue/113207)._
