# Debugging email problem and/or rebuilding discourse

**URL:** https://meta.discourse.org/t/debugging-email-problem-and-or-rebuilding-discourse/86382
**Category:** Self-hosting
**Created:** [29 באפריל,‏ 2018,‏ 1:25am UTC](https://meta.discourse.org/t/debugging-email-problem-and-or-rebuilding-discourse/86382 "2018-04-29T01:25:04Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![kendollard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kendollard/32/95749_2.png) [@kendollard](https://meta.discourse.org/u/kendollard)
#### Post date: [30 באפריל,‏ 2018,‏ 10:05am UTC](https://meta.discourse.org/t/debugging-email-problem-and-or-rebuilding-discourse/86382/4 "2018-04-30T10:05:24Z")

</div>

I’ve now changed to use g suite for email, for unrelated reasons. I can connect using telnet, e.g.:

```
telnet smtp-relay.gmail.com 587
Connected to gmail-smtp-relay.l.google.com.
Escape character is '^]'.
220 smtp-relay.gmail.com ESMTP 195-v6sm2474034itm.9 - gsmtp
EHLO luv
250-smtp-relay.gmail.com at your service, [xxx.xxx.xxx.xxx]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
QUIT
221 2.0.0 closing connection 195-v6sm2474034itm.9 - gsmtp
Connection closed by foreign host.

```

Does that mean the email ports are open?

I setup app.yml like this:

```
DISCOURSE_SMTP_ADDRESS: smtp-relay.gmail.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME:
DISCOURSE_SMTP_PASSWORD:
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

```

Google doesn’t say what to use for user name and password and other posts on meta suggest leaving them blank.

production.log contains:

```
Sent mail to some@example.com (490.0ms)
Completed 422 Unprocessable Entity in 3461ms (Views: 0.6ms | ActiveRecord: 4.9ms)

```

And no email arrives. Do you know what the problem might be, or how I can look further?

---

_[View the full topic](https://meta.discourse.org/t/debugging-email-problem-and-or-rebuilding-discourse/86382)._
