During my adventures in setting up a VPS for my projects, as well as an additional one for a client’s website, I came across many difficulties, the most prominent of which was making it easy for a PHP script to send emails.
I installed sendmail, hoping and praying it was the right package, as a lot of info on it was old. Well, that was a mistake, as I soon learned. My sites would time out with the 503 error when trying to send a form that was supposed to result in an email being sent, and sometimes emails didn’t get sent at all or were seriously delayed, sometimes by several hours.
Needless to say, I was really frustrated, and was ready to rip out sendmail and try exim or some other package. But then, while reading the documentation on installing Discourse, I saw two SMTP services recommended: Mandrill and Mailgun.
I got curious, and signed up for both of them right away to compare the two. Here’s the main differences:
Mandrill lets you send 12,000 emails a month for free, Mailgun has a limit of 10,000 a month.
Mailgun lets you add multiple accounts to a domain to send from, while Mandrill has some weird API key thing.
Why this matters is that with Mailgun I can send someone a different mail account on the domain along with a different password to enter into their script, or use myself, while with Mandrill I have to send someone my actual email address I used to sign up for Mandrill with, as well as an “API key” as a password. While I can have multiple API keys, Mailgun’s approach makes a lot more sense.
Mailgun’s better SMTP accounts setup:
Mandrill’s weird your-email-and-API-key setup:
Mandrill’s setup is different, and my aversion to it doesn’t mean it’s bad. It’s just not good for me.
Mandrill looks better, easier to see stats, Mailgun is not as well designed and you can’t see overall stats.
Both services have monthly quotas, and Mandrill makes it easy to see how much you’ve used in total on the dashboard:
Mailgun has a way to view stats, but no fancy quota meter or “all sites” view:
Mailgun’s stats might also be more in-depth than Mandrill.
Both services have a good design, with Mandrill using some sort of Bootstrap hybrid and Mailgun using their own CSS on everything, so kudos to them for not taking the lazy route.
When you set up your domains though, Mandrill makes it a bit hard to select the text you’ll need to add to your domain records, while Mailgun has it selected as soon as you click in the box, making it easy to copy the stuff you need.
Do the services work? Yes. Is one better than the other? Up to you. I prefer Mailgun over Mandrill for sure, though.
Is sendmail gone? Yep, and thank god. I will probably never be using my own server to send mail for scripts ever again.