Initial Commit

This commit is contained in:
dann4624
2022-09-28 09:38:08 +02:00
parent cac476f80f
commit 2d04a269e6
355 changed files with 52166 additions and 25 deletions
@@ -0,0 +1,26 @@
<?php
namespace Mailjet\LaravelMailjet;
use Illuminate\Mail\MailServiceProvider;
use Mailjet\LaravelMailjet\Transport\MailjetTransport;
class MailjetMailServiceProvider extends MailServiceProvider
{
/**
* Extended register the Swift Transport instance.
*
* @return void
*/
protected function registerSwiftTransport()
{
parent::registerSwiftTransport();
app('swift.transport')->extend('mailjet', function ($app) {
$config = $this->app['config']->get('services.mailjet', array());
$call = $this->app['config']->get('services.mailjet.transactionnal.call', true);
$options = $this->app['config']->get('services.mailjet.transactionnal.options', array());
return new MailjetTransport(new \Swift_Events_SimpleEventDispatcher(), $config['key'], $config['secret'], $call, $options);
});
}
}