# Gmail SMTP Relay Setup not working

**URL:** <https://meta.discourse.org/t/gmail-smtp-relay-setup-not-working/123005>\
**Category:** Self-hosting\
**Created:** [15 ביולי,‏ 2019,‏ 7:35pm UTC](https://meta.discourse.org/t/gmail-smtp-relay-setup-not-working/123005 "2019-07-15T19:35:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Zacharias\_Kreisvorhe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zacharias_kreisvorhe/32/148631_2.png) [@Zacharias\_Kreisvorhe](https://meta.discourse.org/u/Zacharias_Kreisvorhe)\
**Post date:** [15 ביולי,‏ 2019,‏ 7:35pm UTC](https://meta.discourse.org/t/gmail-smtp-relay-setup-not-working/123005/1 "2019-07-15T19:35:36Z")

</div>

Hi Folks,

I’ve installed discourse on an Ubuntu 18.04 by this guide (it’s with Ubuntu 16.04, but I think its quite the same):

> **[How to Install Discourse Forum with Nginx on Ubuntu 16.04](https://www.howtoforge.com/tutorial/how-to-install-and-configure-discourse-forum-with-nginx-on-ubuntu-1604/)**
>
> Discourse is a free and open source software for creating Internet forum community and mailing list. Discourse forum software has been used by many or...

Then I setup the email configuration like here discribed:  
[https://crunchify.com/how-to-setup-email-for-discourse-forum-with-google-apps-smtp-relay-right-way/](https://crunchify.com/how-to-setup-email-for-discourse-forum-with-google-apps-smtp-relay-right-way/)

Note: It dont worked for me to apply just a IP range, only full IP-Address worked.

But I still dont get emails working. When I do the doctor test, it says:

```plaintext
==================== MAIL TEST ====================
...
...
SMTP server connection successful.
Sending to info@likamundi-lernen.de. . . 
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to

==================== DNS PROBLEM ====================
This server reports NOT FOUND, but discourse.likamundi.de reports Discourse 2.4.0.beta2 .
This suggests that you have a DNS problem or that an intermediate proxy is to blame.
If you are using Cloudflare, or a CDN, it may be improperly configured.

```

I also tried to set “Allowed senders” in the gmail suite to “all”, but that also not helped.

And of curse, if I try to setup the admin account, I just dont get a mail…

Can anybody help me here, cant be possible that thats so hard to setup ^^

Kind regards,  
Zacharias

---

_[View the full topic](https://meta.discourse.org/t/gmail-smtp-relay-setup-not-working/123005)._
