Switching Your Discourse from Mandrill to Mailgun

AI-generated summary

codinghorror announces that Mandrill is ceasing operations as a standalone service on April 27, 2016, forcing users to migrate to MailChimp at a significantly higher cost ($40/month) or switch providers. As an alternative, codinghorror recommends Mailgun, providing a step-by-step guide on signing up, verifying domains, and updating the app.yml configuration file with SMTP credentials before rebuilding the Discourse instance. appshah inquires about adding Gmail SMTP as a standard admin panel option; tobiaseigen clarifies that app.yml editing remains necessary and suggests Mailgun for its reliability. Falco points to the version 1.5 changelog. Technical troubleshooting follows: cregox notes a mail-tester score of 7.5, prompting codinghorror to fix a broken link in the guide. alehandrof shares a critical fix for Mailgun deliverability issues, explaining that adding MX records for the sending domain is required to pass Sender Address Verification checks. codinghorror advises clearing Sidekiq email backlogs before switching to avoid queue failures. Finally, Steven reports that Mailgun now requires a credit card for new accounts, a recent change that may affect setup.

Discourse requires email to function, so we’ve always had a symbiotic relationship with third party email providers. In the past we’ve recommended Mandrill, we use it ourselves for some of our sites, and we’ve had nothing but positive experiences with Mandrill … until now. Mandrill announced on February 24th that they are essentially closing the Mandrill service…


This topic is for comments on the original blog entry at: Switching Your Discourse from Mandrill to Mailgun

18 Likes

Is there any way to provide Google Gmail (SMTP) or Google Apps (SMTP-relay) as one of standard option in Discourse admin panel - rather updating app.yml?

Between, is there any post on new version 1.5 release? I mean change log summary?

1 Like

Other than this?

wow. that’s big list :slight_smile: Thanks @Falco

1 Like

Setting up SMTP has to be done by updating app.yml, sorry.

Using google for SMTP has been discussed at length.. try the search. Here’s one.

https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326/128?u=tobiaseigen

I personally tried it and gave up on it in favor of mandrill, and now have switched to mailgun. It’s easy and “set and forget” once it’s working.

3 Likes

Is a mail-tester score of 7.5 out of 10 expected? To me it looks like everything is fine, except maybe there’s a broken link there ( “Test your DKIM record” ) you guys could fix.

2 Likes

Thanks, I just fixed that link. I wish sendgrid.com would request removal from that greylist they are on – I can’t really do that for them.

I had deliverability issues with Mailgun that I fixed by adding MX records for our Mailgun subdomain:
https://documentation.mailgun.com/quickstart-receiving.html#add-receiving-mx-records

It’s a bit counterintuitive, because we’re not receiving emails through Mailgun. But here’s what Mailgun’s support told me:

The error (which is called Sender Address Verification) that you are seeing is due to the recipient server performing a MX lookup on the envelope.mail-from address and failing to find the records for the domain listed. Some email servers check the domain in this envelope.mail-from field for MX records, and if the records do not exist, the email servers reject the message. Therefore, by adding Mailgun’s MX records to your domain, the MX lookups of those email servers should succeed, and the servers will accept your messages.

Hope this helps other frustrated folks!

2 Likes

As helpfully noted here:

https://meta.discourse.org/t/how-can-i-cancel-a-failed-email-job/44591/2?u=codinghorror

You may need to clear your giant mail queue backlog in Sidekiq before making this switch, if you had a failing email situation going on for some time.

2 Likes

It looks like a credit card is required for an account in Mailgun to be able to send emails.

I’ve been working all night on a new forum to see why emails didn’t work. And I just noticed this change on their sign up form. It worked as usual 2 weeks ago I think, it must be pretty recent.

Old accounts are not affected at the moment tho

6 Likes