From d6f3934f803d93b2ca355c483291456487e1fe56 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Mon, 13 May 2024 08:51:12 +0200 Subject: [PATCH 1/3] use correct variable name for mail driver closes #209 --- app/Console/Commands/Environment/EmailSettingsCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/Environment/EmailSettingsCommand.php b/app/Console/Commands/Environment/EmailSettingsCommand.php index 15f18b9b0..82a83d68d 100644 --- a/app/Console/Commands/Environment/EmailSettingsCommand.php +++ b/app/Console/Commands/Environment/EmailSettingsCommand.php @@ -31,7 +31,7 @@ class EmailSettingsCommand extends Command */ public function handle(): void { - $this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice( + $this->variables['MAIL_MAILER'] = $this->option('driver') ?? $this->choice( trans('command/messages.environment.mail.ask_driver'), [ 'log' => 'Log', @@ -44,7 +44,7 @@ class EmailSettingsCommand extends Command 'smtp', ); - $method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables'; + $method = 'setup' . studly_case($this->variables['MAIL_MAILER']) . 'DriverVariables'; if (method_exists($this, $method)) { $this->{$method}(); } From 55a0bfdf7eee9881f7cf4e7be1af995182012bde Mon Sep 17 00:00:00 2001 From: Boy132 Date: Mon, 13 May 2024 08:53:14 +0200 Subject: [PATCH 2/3] remove "MAIL_DRIVER" from phpunit.xml --- phpunit.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index a3f699ebd..28ecef304 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -17,7 +17,6 @@ - From ef9d1ab614213e7d5ffdbce8001b4fa80188e9a8 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Mon, 13 May 2024 08:57:06 +0200 Subject: [PATCH 3/3] use env value as default for driver choice --- app/Console/Commands/Environment/EmailSettingsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/Environment/EmailSettingsCommand.php b/app/Console/Commands/Environment/EmailSettingsCommand.php index 82a83d68d..b67a5ed77 100644 --- a/app/Console/Commands/Environment/EmailSettingsCommand.php +++ b/app/Console/Commands/Environment/EmailSettingsCommand.php @@ -41,7 +41,7 @@ class EmailSettingsCommand extends Command 'mandrill' => 'Mandrill', 'postmark' => 'Postmark', ], - 'smtp', + env('MAIL_MAILER', env('MAIL_DRIVER', 'smtp')), ); $method = 'setup' . studly_case($this->variables['MAIL_MAILER']) . 'DriverVariables';