# 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:** 4

<div class="post-metadata">

**Author:** ![mfitzp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mfitzp/32/179630_2.png) [@mfitzp](https://meta.discourse.org/u/mfitzp)\
**Post date:** [7 במאי,‏ 2020,‏ 9:04am UTC](https://meta.discourse.org/t/gmail-smtp-relay-setup-not-working/123005/4 "2020-05-07T09:04:31Z")

</div>

Probably a bit late to help you here, but I can confirm it is possible to use GSuite smtp-relay to send your Discourse emails.

The following is a configuration for using the smtp-relay (in Gmail app settings) with no authentication (IP address only). First as you say, you need to configure the app settings to “Only accept mail from the specified IP addresses”, adding the addresses of your Discourse server.

The configuration on Discourse side is then –

```
DISCOURSE_SMTP_ADDRESS: smtp-relay.gmail.com      
DISCOURSE_SMTP_PORT: 587                        
DISCOURSE_SMTP_USER_NAME:    
DISCOURSE_SMTP_PASSWORD:     

```

They key thing, and what tripped me up for an hour or so, is that you need to specify the username and password vars but leave them blank. Any other values (none, ‘’, etc.) won’t work.

---

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