Switching Your Discourse from Mandrill to Mailgun

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: http://blog.discourse.org/2016/03/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