mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 05:32:49 +08:00
Mail: Add an array of supported drivers
This can be used for e.g. validation, or a dropdown in the frontend. It can also be extended by extensions, such as flagrow/mail-drivers. Refs #1169.
This commit is contained in:
parent
8a93f8b6b6
commit
208bad393f
|
@ -25,6 +25,10 @@ class MailServiceProvider extends AbstractServiceProvider
|
||||||
{
|
{
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
|
$this->app->singleton('mail.supported_drivers', function () {
|
||||||
|
return ['smtp', 'mail', 'log'];
|
||||||
|
});
|
||||||
|
|
||||||
$this->app->singleton('swift.mailer', function ($app) {
|
$this->app->singleton('swift.mailer', function ($app) {
|
||||||
$settings = $app->make(SettingsRepositoryInterface::class);
|
$settings = $app->make(SettingsRepositoryInterface::class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user