Email doesn't work on Discourse

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?

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

No logs show:

This is what I got from Mailgun.

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

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?

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

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