mardi 23 août 2016

Add a new transport driver to Laravel's Mailer

I need to add a new transport driver to Laravel's mail package so that I can send e-mails through an external service (Mailjet) that isn't supported by default.

Writing the transport driver won't be a problem, but I can't find a way to hook in and add a new one so I can continue to use Laravel's mailer as normal. I can't find any documentation on extending the Mailer.

The only way I can come up with would be to replace where Laravel's MailServiceProvider is being referenced in config/app.php with my own service provider, which I could then use to register my own TransportManager and my own transport driver.

Is there a better way to add another transport driver?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire