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 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?
pfaffman
(Jay Pfaffman)
June 17, 2025, 1:32am
2
Sounds good. What do the mailgun logs say about the messages it’s received?
Ethsim2
(Ethan )
June 17, 2025, 3:03pm
6
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
1 Like
They just referred me to: 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?
Looks like DigitalOcean blocked ports 465 and 587. They unblocked it but it still don’t work.
1 Like
Ethsim2
(Ethan )
June 18, 2025, 6:31am
9
change DISCOURSE_SMTP_USERNAME
to 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?
Ethsim2
(Ethan )
June 18, 2025, 6:45am
10
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
Ethsim2
(Ethan )
June 18, 2025, 7:00am
11
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