From f3ff95cc5768fa008ba6d94ebc2d5fd525a2fd32 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Fri, 17 Nov 2023 05:30:47 -0800 Subject: [PATCH] Allow to set SMTP timeout via MAIL_SMTP_TIMEOUT .env parameter --- config/mail.php | 2 +- .../laravel/framework/src/Illuminate/Mail/TransportManager.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/mail.php b/config/mail.php index 781294898..75711f5cc 100644 --- a/config/mail.php +++ b/config/mail.php @@ -127,6 +127,6 @@ | */ - 'timeout' => env('MAIL_TIMEOUT', 30), + 'smtp_timeout' => env('MAIL_SMTP_TIMEOUT', 30), ]; diff --git a/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php b/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php index 2ed34ac43..25d44a14a 100644 --- a/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php +++ b/overrides/laravel/framework/src/Illuminate/Mail/TransportManager.php @@ -54,7 +54,7 @@ protected function createSmtpDriver() } // SMTP Timeout. - $transport->setTimeout(config('mail.timeout')); + $transport->setTimeout(config('mail.smtp_timeout')); return $transport; }