1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix for multiple email accounts

This commit is contained in:
Hillel Coren 2018-05-08 10:56:05 +03:00
parent 7459d516cf
commit d44834d5ee

View File

@ -79,7 +79,13 @@ class Mailer
config(['mail.' . $field => $value]);
}
}
(new \Illuminate\Mail\MailServiceProvider(app()))->register();
$app = \App::getInstance();
$app->singleton('swift.transport', function ($app) {
return new \Illuminate\Mail\TransportManager($app);
});
$mailer = new \Swift_Mailer($app['swift.transport']->driver());
Mail::setSwiftMailer($mailer);
}
}
}