# Discourse can't send activation mails after subdomain change

**URL:** https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888
**Category:** Support
**Created:** [August 16, 2018, 3:44pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888 "2018-08-16T15:44:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [August 16, 2018, 3:44pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/1 "2018-08-16T15:44:50Z")

</div>

I used SendGrid for Discourse. But after changing subdomain on Discourse activation mails not sending.

Our SMPTP Settings:

```
   DISCOURSE_SMTP_ADDRESS: smtp.sendgrid.net
   DISCOURSE_SMTP_PORT: 587
   DISCOURSE_SMTP_USER_NAME: ********
   DISCOURSE_SMTP_PASSWORD: **********

```

/logs

`Failed to process hijacked response correctly : undefined method `email’ for nil:NilClass`

And ideas?

---

<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 16, 2018, 4:30pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/2 "2018-08-16T16:30:53Z")

</div>

Have you configured the new subdomain at sendgrid?

---

<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 16, 2018, 4:36pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/3 "2018-08-16T16:36:13Z")

</div>

You can try `./discourse-doctor`, which attempts to do some debugging of SMTP connections.

---

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [August 16, 2018, 4:51pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/4 "2018-08-16T16:51:22Z")

</div>

@itsbhanusharma No actually. I think Sendgrind works with just username and password, right? Should I do it?

@pfaffman I use that option and test it my mail system with mail-tester. According to the results, it seems our mail system works fine and it gives me score 9/10 . But sometimes i have trouble with activation mail when i create test user with my own mails.

---

<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 16, 2018, 5:53pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/5 "2018-08-16T17:53:18Z")

</div>

Actually the DMARC error you’re talking about probably needs you to edit your dmarc policy to allow sendgrid as an authorized sender. Hence, you need to add the necessary SPF and DKIM records for sendgrid and then create dmarc policy accordingly.

Please check if your notification email property in settings is still pointing to previous domain as that may also cause similar issues.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 24, 2021, 2:24pm UTC](https://meta.discourse.org/t/discourse-cant-send-activation-mails-after-subdomain-change/94888/6 "2021-03-24T14:24:08Z")

</div>


