# Mail issues making my head spin

**URL:** https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298
**Category:** Self-hosting
**Created:** [August 18, 2020, 6:04pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298 "2020-08-18T18:04:32Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Matt\_Shields](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matt_shields/32/148848_2.png) [@Matt\_Shields](https://meta.discourse.org/u/Matt_Shields)
#### Post date: [August 18, 2020, 6:04pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/1 "2020-08-18T18:04:32Z")

</div>

I’ve been fussing around with this for a few days now and I can’t seem to figure out why I’m not able to get mail working. The domain is registered with Namecheap and I pointed it to Cloudflare and then installed discourse on Digital Ocean and am trying to implement Sendgrid.  
Containers folder is set up this way

```
  DISCOURSE_SMTP_ADDRESS: smtp.sendgrid.net
  DISCOURSE_SMTP_PORT: 2525
  DISCOURSE_SMTP_USER_NAME: apikey
  DISCOURSE_SMTP_PASSWORD: "Q0Ou956E" (removed most of the password)
  DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: matthew@virtusventus.com

```

I’ve run discourse Doctor and it says that it connects and succeeds.. Sendgrid reports dont show the message and I never recieve any email.. I’ve been searching tweaking different lines however nothing seems to work..

What am I missing?

---

<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: [August 18, 2020, 7:04pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/2 "2020-08-18T19:04:05Z")

</div>

> [@Matt\_Shields](#):
>
> I’ve run discourse Doctor and it says that it connects and succeeds

That almost certainly means that it was delivered to sendgrid.

> [@Matt\_Shields](#):
>
> Sendgrid reports dont show the message

My only guess is that you’re logged in to the wrong sendgrid account. You can try using [mail-tester.com](http://mail-tester.com) and see if it gets there.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [August 18, 2020, 7:20pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/3 "2020-08-18T19:20:45Z")

</div>

Another possibility could be a badly configured sender address. Are you sending mail from the same domain as your Discourse hostname? If not, then did you change the notification email address?

---

<div class="post-metadata">

### Author: ![Matt\_Shields](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matt_shields/32/148848_2.png) [@Matt\_Shields](https://meta.discourse.org/u/Matt_Shields)
#### Post date: [August 18, 2020, 7:28pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/4 "2020-08-18T19:28:39Z")

</div>

I’m using a different domain for discourse then what I am for the developer email… and yes I changed the notification address at the end of the containers app to match the email address that I’m using for the developer email

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [August 18, 2020, 7:41pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/5 "2020-08-18T19:41:26Z")

</div>

Did you rebuilt after the change?

And I’m not exactly an expert with sendgrid but if by developer email you meant something equivalent of a sandbox, one possible reason is that the sandbox only allows sending to verified addresses.

But if that’s not the case, first thing I’d be looking at is sendgrid logs in my account to verify if sendgrid is rejecting my emails for some reason.

---

<div class="post-metadata">

### Author: ![Matt\_Shields](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matt_shields/32/148848_2.png) [@Matt\_Shields](https://meta.discourse.org/u/Matt_Shields)
#### Post date: [August 19, 2020, 12:52am UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/6 "2020-08-19T00:52:33Z")

</div>

yes it has been rebuilt… the ‘Developer email’ is set in Discourse.. that what the set up calls ir

---

<div class="post-metadata">

### Author: ![Matt\_Shields](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matt_shields/32/148848_2.png) [@Matt\_Shields](https://meta.discourse.org/u/Matt_Shields)
#### Post date: [August 19, 2020, 1:23am UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/7 "2020-08-19T01:23:51Z")

</div>

Here is the output from Discourse Doctor.. but SendGrid doesnt recieve it

```plaintext

==================== MAIL TEST ====================

For a robust test, get an address from http://www.mail-tester.com/

Or just send a test message to yourself.

Email address for mail test? ('n' to skip) [matthew@Virtusventurs.com]: 

Sending mail to matthew@Virtusventurs.com. . . 

Testing sending to matthew@Virtusventurs.com using smtp.sendgrid.net:2525.

SMTP server connection successful.

Sending to matthew@Virtusventurs.com. . . 

Mail accepted by SMTP server.
```

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [August 19, 2020, 2:41am UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/8 "2020-08-19T02:41:31Z")

</div>

> [@Matt\_Shields](#):
>
> Mail accepted by SMTP server.

This line suggests that the mail reached sendgrid so you’ll have to check with them why it isn’t being delivered.

---

<div class="post-metadata">

### Author: ![Matt\_Shields](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/matt_shields/32/148848_2.png) [@Matt\_Shields](https://meta.discourse.org/u/Matt_Shields)
#### Post date: [August 19, 2020, 8:06pm UTC](https://meta.discourse.org/t/mail-issues-making-my-head-spin/161298/9 "2020-08-19T20:06:06Z")

</div>

Thanks eveyone… I was able to get it sorted.. it was on the send grid side
