# E-Mail not working after moving to self-hosting and adding DKIM record

**URL:** https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222
**Category:** Self-hosting
**Created:** [December 6, 2021, 12:11pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222 "2021-12-06T12:11:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JMA](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JMA](https://meta.discourse.org/u/JMA)
#### Post date: [December 6, 2021, 12:11pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222/1 "2021-12-06T12:11:02Z")

</div>

We’ve moved from discourse-hosting to self-hosting and can’t seem to get e-mail to work properly. E.g., when i try to use mail-tester in combination with the mail-testing function of discourse the mail doesn’t even appear to be sent or at least it never shows up in mail-testers mailbox even though it says it sent the e-mail on discourse. Apparently E-Mail worked in the beginning but after setting up the DKIM record it stopped working.

Domain and Mailserver are with namecheap.

**These are the SMTP Settings in the app.yml file:**

 ![Screenshot_45](https://global.discourse-cdn.com/meta/original/3X/a/0/a095b4052ccce8d33b65cc49f4f4db2b9097509e.png)

I’m not quite sure what i’m missing, did i set up the SPF record incorrectly? Is there an issue with my SMTP settings or the DKIM record?

Any pointers or help would be greatly appreciated, thank you! 🙂

More Screenshots below, since i can only upload one picture per post.

---

<div class="post-metadata">

### Author: ![JMA](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JMA](https://meta.discourse.org/u/JMA)
#### Post date: [December 6, 2021, 12:11pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222/2 "2021-12-06T12:11:56Z")

</div>

**These are the records i currently have set-up:**

 ![Screenshot_42](https://global.discourse-cdn.com/meta/original/3X/b/f/bf03a07828444dd807288b5cb57c8f70528ebc03.png)

---

<div class="post-metadata">

### Author: ![JMA](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JMA](https://meta.discourse.org/u/JMA)
#### Post date: [December 6, 2021, 12:13pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222/3 "2021-12-06T12:13:50Z")

</div>

**This is what Mxtoolbox comes up with when I test my domain and e-mail:**

 ![Screenshot_43](https://global.discourse-cdn.com/meta/original/3X/1/e/1e5da2955d59a1f95298ceecfcc1624f2c73946b.png)

---

<div class="post-metadata">

### Author: ![JMA](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@JMA](https://meta.discourse.org/u/JMA)
#### Post date: [December 6, 2021, 12:14pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222/4 "2021-12-06T12:14:32Z")

</div>

**and**

 ![Screenshot_44](https://global.discourse-cdn.com/meta/original/3X/a/9/a9087b8857fb408ba4d5269e23ec06a5127c0032.png)

---

<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: [December 6, 2021, 5:11pm UTC](https://meta.discourse.org/t/e-mail-not-working-after-moving-to-self-hosting-and-adding-dkim-record/211222/5 "2021-12-06T17:11:07Z")

</div>

You’ll need to check with `privateemail.com` to see if you have stuff set up to suit them. You might also have a look at [Troubleshooting email on a new Discourse install](https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326) for some tips.
