From 208bad393f37bfdb76007afcddfa4b7451563e9d Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 20 Dec 2018 13:31:28 +0100 Subject: [PATCH] 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. --- src/Foundation/MailServiceProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Foundation/MailServiceProvider.php b/src/Foundation/MailServiceProvider.php index 362832c36..19bfb16b9 100644 --- a/src/Foundation/MailServiceProvider.php +++ b/src/Foundation/MailServiceProvider.php @@ -25,6 +25,10 @@ class MailServiceProvider extends AbstractServiceProvider { public function register() { + $this->app->singleton('mail.supported_drivers', function () { + return ['smtp', 'mail', 'log']; + }); + $this->app->singleton('swift.mailer', function ($app) { $settings = $app->make(SettingsRepositoryInterface::class);