2
votes

I am trying to create a new application on Laravel 4, and learning more about Laravel day by day.

I am using an Amazon EC2 server and I would like to integrate Amazon SES into my application as default e-mail library. I can do this manually with AWS PHP SDK, however:

I was wondering... Would it be suitable or possible to implement it as a default e-mail method on Laravel 4, and how could I do it? Shall I write a library that comforts all functions of the default e-mail package of Laravel, or shall I just implement SMTP feature of SES?

Most basically, I want to send all of my e-mails through SES. It would be nice to know if there is another method other than SMTP. (So that, by having my own e-mail library with SES support integrated right into all of the Laravel core functions -such as Auth password reminder, I would get benefit of features specific to Amazon SES such as regions [though it is only in one region for now], queuing etc...) It would be nice to define 'driver' => 'aws-ses' in app/config/mail.php :)

Thanks in advance,

1

1 Answers

1
votes

Basically what you can do is extend the default Illuminate\Mail\MailServiceProvider to include ses, particularly at https://github.com/laravel/framework/blob/master/src/Illuminate/Mail/MailServiceProvider.php#L78

As far as I know there a Amazon SES SwiftMailer transport available on http://packagist.org which you can use. Would be good if you can share the package to everyone else too :)

Update:

SES transport is now supported by default in 5.0