# SMTP Delivery Problems

**URL:** https://meta.discourse.org/t/smtp-delivery-problems/131585
**Category:** Self-hosting
**Created:** [October 21, 2019, 8:26pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585 "2019-10-21T20:26:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Antichrist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antichrist/32/159976_2.png) [@Antichrist](https://meta.discourse.org/u/Antichrist)
#### Post date: [October 21, 2019, 8:26pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585/1 "2019-10-21T20:26:47Z")

</div>

I’ve been struggling with settings up SMTP to work, I really hope someone can help me out with my sccenario. So let’s say that my discourse forum is located at `discourseaddress.com` and my mail is at `mailserver.com`. The discourse is on a Google Cloud VM, the Mail server is on a different host (It’s just a simple webhost with cPanel)

My Settings are the following:

```plaintext
Hostname: discourseaddress.com
Email: user@discourseaddress.com
SMTP address: mailserver.com
SMTP port: 26
SMTP username: discourse@discourseaddress.com
SMTP password: mailpassword

```

With these settings, I get an error that my host name does not match the certificate, and mails do not get delivered.  
If i use DISCOURSE\_SMTP\_OPENSSL\_VERIFY\_MODE: none, mails do get delivered, but I don’t think that it’s secure? (I get 10/10 on [mailtester.com](http://mailtester.com) tho with this setting)

If someone can give me some feedback about this, I would really appreciate it.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 21, 2019, 8:31pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585/2 "2019-10-21T20:31:42Z")

</div>

The problem appears to be that [mailserver.com](http://mailserver.com)’s certificate is bad. Perhaps [mailserver.com](http://mailserver.com) has some other name that you should be using.

---

<div class="post-metadata">

### Author: ![Antichrist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antichrist/32/159976_2.png) [@Antichrist](https://meta.discourse.org/u/Antichrist)
#### Post date: [October 21, 2019, 8:45pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585/3 "2019-10-21T20:45:04Z")

</div>

Could you be a bit more clear about this? My mailserver’s SSL certificate is issued by Let’s Encrypt, but that’s behind the 465 port (i use 26, 465 doesn’t work at all) and my Discourse is certified by CloudFlare. I am not sure if I’m getting the whole certificate thing.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 21, 2019, 8:50pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585/4 "2019-10-21T20:50:41Z")

</div>

This is the one that’s broken:

```
SMTP address: mailserver.com

```

either whoever manages that mail server has it misconfigured and/or it answers to `mailserver.com` but it has a certificate only for (something like) `mail.mailserver.com`. Whoever manages that server is who to ask. This is not a problem with Discourse. If you manage the mail server, either figure out how to fix the certificate, or just punt and use the `DISCOURSE_SMTP_OPENSSL_VERIFY_MODE`, which works.

---

<div class="post-metadata">

### Author: ![Antichrist](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antichrist/32/159976_2.png) [@Antichrist](https://meta.discourse.org/u/Antichrist)
#### Post date: [October 21, 2019, 8:56pm UTC](https://meta.discourse.org/t/smtp-delivery-problems/131585/5 "2019-10-21T20:56:17Z")

</div>

Alright, thank you very much, I will try to figure it out, also gonna contact the email server provider.  
Thanks again!  
Best regards
