Both "driver" and "adapter" as terms for instances of what has gotten labeled the "adapter pattern" were around before the architectural idea of design patterns was applied to software, so its not a new name for it.
Shouldn't you have been using MailChimp all along? Mandrill is for transactional email messages (e.g. password resets, order receipts, etc). Did they ever allow bulk marketing messages through Mandrill?
Mailchimp is much more expensive and our clients wouldn't be using their interface anyway.
I was not happy with Mandrill's decision but can't complain since it was free. I'm moving to amazon email services.
I think case in point, free is not forever in SaaS business.
You'll notice there is an abstract class "Transport.php" which declares certain methods (via the Swift_Transport interface class) that the "MandrillTransport", "MailgunTransport" and the "SesTransport" must all implement.
> I think case in point, free is not forever in SaaS business.
Our account & our customers' accounts were all paid. Some of them send up to 500,000 emails each per month. I would have been fine with them getting rid of the free tier, its the TOS change for marketing emails that killed our use with them.
Now if you moved to SES from Mandrill, you just change it in 1 place. It's not rocket science or voodoo.
Then you don't even change the code, but just configuration.
APIs are great, but I'd say protocols (or at least the well adopted ones) are better.
HTTP-POST can handle the request chain inline, and deliver a single response, the decision tree is much lighter.
For that matter, HTTP-POST can partially to completely defer all processing decision trees, always returning 200 OK, offloading to a queue system that will process the request out of band, and issue the real response errors via a dashboard. Making it lighter still.
SMTP is chatty. Even when you use PIPELINING. It tends to send way more packets than HTTP. And while you can open one connection and send multiple mails through it, the likelihood of your client library doing that is pretty low, sadly.
https://en.wikipedia.org/wiki/Dependency_inversion_principle
Case in point: Mandrill announced two days ago that they were going to merge their product with MailChimp which included a terms of service change that banned marketing emails from Mandrill after their forced migration date in April. At work we have a commercial real estate app which lets our customers send marketing emails. We had built this functionality on top of mandrill but using a driver based system. Last night I launched a Mailgun driver and we have already started to migrate customers with their own Mandrill accounts to MG. If we hadn't used a driver based system we would be screwed for the next few weeks.
Build your api integrations via drivers. Even if you only have one driver. You will be happy you did later.