kirschbaum-development / mail-intercept

A testing package for intercepting mail sent from Laravel
MIT License
107 stars 7 forks source link

Fixes retrieving the swift mail transport from the app container in Laravel 7 #3

Closed michaelfox closed 4 years ago

michaelfox commented 4 years ago

Laravel 7 removes the swift.transport binding from the app container. Upgrade guide:

Laravel 7.x doesn't provide swift.mailer and swift.transport container bindings. You may now access these objects through the mailer binding:

$swiftMailer = app('mailer')->getSwiftMailer();
$swiftTransport = $swiftMailer->getTransport();