Created
March 7, 2016 05:16
-
-
Save maxwellimpact/46ded5c553f68946d13d to your computer and use it in GitHub Desktop.
Sample service provider for extending Laravel's mail provider.
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 | |
namespace App\Providers; | |
use Illuminate\Mail\MailServiceProvider; | |
class ExtendedMailServiceProvider extends MailServiceProvider | |
{ | |
/** | |
* Extended register the Swift Transport instance. | |
* | |
* @return void | |
*/ | |
protected function registerSwiftTransport() | |
{ | |
parent::registerSwiftTransport(); | |
app('swift.transport')->extend('spark', function($app) | |
{ | |
return new \App\Mail\SparkPostTransport('theclient', 'thekey123'); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment