Skip to content

Commit

Permalink
Allow to set SMTP timeout via MAIL_TIMEOUT .env parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Nov 17, 2023
1 parent c2bd39a commit 4a2f4fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,13 @@
],
],

/*
|--------------------------------------------------------------------------
| Swiftmailer SMTP timeout.
|--------------------------------------------------------------------------
|
*/

'timeout' => env('MAIL_TIMEOUT', 30),

];
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ protected function createSmtpDriver()
$transport->setStreamOptions($config['stream']);
}

// SMTP Timeout.
$transport->setTimeout(config('mail.timeout'));

return $transport;
}

Expand Down

0 comments on commit 4a2f4fd

Please sign in to comment.