Laravel SMTP driver vs. API drivers
After Mandrill changed their pricing model, I (as well as many others) started exploring different transactional email services. Laravel only supports a couple providers out of the box, but what about the others?
All Laravel mail drivers are managed by a core TransportManager, but it was a pain in the ass to register custom drivers in your application service provider. I even had to make a pull request to the Laravel framework to make it somewhat possible. Now that the pull request is merged you will be able to register a new mail driver like this:
public function register()
{
$this->app['swift.transport']->extend('postmark', function () {
return new PostmarkTransport($this->app['config']->get('services.postmark.token'));
});
}
But is it worth it? I mean, almost every email service has support for SMTP, and Laravel has an SMTP driver by default. So why even bother registering a custom email driver?
First I thought it would make a difference in performance. So I did some quick tests on an Ubuntu Vagrant box:
Link: