# Email doesn't work on Discourse

**URL:** https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457
**Category:** Support
**Tags:** email
**Created:** [June 17, 2025, 1:16am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457 "2025-06-17T01:16:10Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Preeminence](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Preeminence](https://meta.discourse.org/u/Preeminence)
#### Post date: [June 17, 2025, 1:16am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/1 "2025-06-17T01:16:11Z")

</div>

I’m using Mailgun for my discourse and I have the records and app.yml properly set up. When I click register to make an admin and configure the discourse install It does nothing. I made an account with the rake command and got in, but when I try to register or create an account the mailgun service doesn’t send any emails.

Read this [Troubleshoot email on a new Discourse install - #556 by Preeminence](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326/556) and tried it. Still doesn’t work.

- All emails settings are correctly entered
- Password doesn’t contain special characters
- Rebuilt the app and destroyed and started the app.
- Port 587 doesn’t work, Port 2525 works.
- Discourse logs reports 200 OK success.
- All records including DKIM and SPF records are set up properly.
- Email domain is correct
- Paid $15 upon signup to mailgun via credit card so account is activated.
- Not using IP address of the domain. I’m using Domain name.

Any reason why Email with Mailgun is not working?

---

<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: [June 17, 2025, 1:32am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/2 "2025-06-17T01:32:42Z")

</div>

> [@Preeminence](#):
>
> Port 587 doesn’t work, Port 2525 works

Sounds good. What do the mailgun logs say about the messages it’s received?

---

<div class="post-metadata">

### Author: ![Preeminence](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Preeminence](https://meta.discourse.org/u/Preeminence)
#### Post date: [June 17, 2025, 1:42am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/3 "2025-06-17T01:42:26Z")

</div>

No logs show:

 ![The image shows a computer screen displaying a software interface with the message 'We looked really hard but... No data found' and an illustration of a laptop with a crossed-out thought bubble, indicating a failed task. The interface includes sections for metrics, logs, and bounce classification, with options to refresh... (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/3/7/0/3705eee75b7e044b4d308ff804134f2b0de10e44.png)

---

<div class="post-metadata">

### Author: ![Preeminence](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Preeminence](https://meta.discourse.org/u/Preeminence)
#### Post date: [June 17, 2025, 3:01pm UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/5 "2025-06-17T15:01:49Z")

</div>

This is what I got from Mailgun.

 ![The image is a screenshot of the Mailgun welcome page detailing account setup and resources for a Mailgun email service. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/3/3/c/33cbe36b8c347f61394e4529d4d15e695892854a.png)

 ![The image shows an email verification notice from Mailgun indicating that bidsturf.com is now verified. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/7/a/7/7a76e2c1680586656b02f6c71a1a2a20365adf89.png)

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [June 17, 2025, 3:03pm UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/6 "2025-06-17T15:03:06Z")

</div>

yes, they’re quick to send email with the quick start guide. I’d probably ask MailGun to confirm what you’re rate limit / sending limit is by email

---

<div class="post-metadata">

### Author: ![Preeminence](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Preeminence](https://meta.discourse.org/u/Preeminence)
#### Post date: [June 17, 2025, 10:33pm UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/7 "2025-06-17T22:33:12Z")

</div>

They just referred me to: [https://help.mailgun.com/hc/en-us/articles/202464990-How-can-I-start-sending-email](https://help.mailgun.com/hc/en-us/articles/202464990-How-can-I-start-sending-email)

I’m already using the Mailgun SMTP in app.yml file.

Did I set the file up correctly?

 ![This is a screenshot displaying a text editor interface with various lines of code in different colors, suggesting it is being used for programming, possibly Python, and includes sections with comments and documentation. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/c/6/c/c6c47e3e31272de631b36e64d2f287db46e4db70.png)

 ![<pre><code>[02 15 24 26 259] [02 24 26 259 168] [06 15 24 266] [07 25 26 259 168]</pre> (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/0/1/401e5aeaa5ad847d7d127b8e3804903fb20d0f77.png)

---

<div class="post-metadata">

### Author: ![Preeminence](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Preeminence](https://meta.discourse.org/u/Preeminence)
#### Post date: [June 18, 2025, 2:06am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/8 "2025-06-18T02:06:24Z")

</div>

Looks like DigitalOcean blocked ports 465 and 587. They unblocked it but it still don’t work.

 ![The image is a screenshot of an email from DigitalOcean Support, informing a user that previously blocked ports 465 and 587 have been unlocked and providing access until further notice. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/3/1/e/31ef01d62ecae91a93e72a523d72ab85e95e81d5.png)

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [June 18, 2025, 6:31am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/9 "2025-06-18T06:31:26Z")

</div>

change `DISCOURSE_SMTP_USERNAME` to [postmaster@yourdomain.com](mailto:postmaster@yourdomain.com), also reflect this change in the SMTP user on Mailgun.

your `DISCOURSE_SMTP_ADDRESS` is correct for US Region/Country

Also my Discourse works without the  
“…” on `DISCOURSE_SMTP_PASSWORD`

This might seem like a silly question but are you sure you want your mail domain to be root host?

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [June 18, 2025, 6:45am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/10 "2025-06-18T06:45:50Z")

</div>

also, to save on rebuilds, might be worth adding some more plugins, below is a list of plugins i used to have and i have no idea which apply to you

 ![IMG_9911](https://global.discourse-cdn.com/meta/original/4X/9/2/0/9206568d482eb6dfa11866c16b5d9cefbbd65208.jpeg)

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [June 18, 2025, 7:00am UTC](https://meta.discourse.org/t/email-doesnt-work-on-discourse/370457/11 "2025-06-18T07:00:33Z")

</div>

also i’d recommend a firewall, you could use ufw and then 1 rules - to allow port 443 for mail-receiver → app

`ufw enable`

`ufw status verbose`
