Last active
June 23, 2016 19:37
-
-
Save kingpabel/09a8d92e0a1bc3a07fb27ed0a6b5616e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Email configuration is set in static method,that's why when same request multiple time email configuration changed,it was not work. | |
//for more details http://laravel.io/forum/07-22-2014-swiftmailer-with-dynamic-mail-configuration | |
$app = \App::getInstance(); | |
$app['swift.transport'] = $app->share(function ($app) { | |
return new TransportManager($app); | |
}); | |
$mailer = new \Swift_Mailer($app['swift.transport']->driver()); | |
\Mail::setSwiftMailer($mailer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment