From 7f6d2877fb645d406595c5b5beb7d0924bfec81c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 2 Apr 2023 19:43:24 +0200 Subject: [PATCH] Better defaults for email. --- config/mail.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/config/mail.php b/config/mail.php index eae17fd2a7..5a83a2ae08 100644 --- a/config/mail.php +++ b/config/mail.php @@ -38,11 +38,11 @@ return [ 'mailers' => [ 'smtp' => [ 'transport' => 'smtp', - 'host' => env('MAIL_HOST', 'smtp.mailtrap.io'), + 'host' => envNonEmpty('MAIL_HOST', 'smtp.mailtrap.io'), 'port' => (int)env('MAIL_PORT', 2525), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), + 'encryption' => envNonEmpty('MAIL_ENCRYPTION', 'tls'), + 'username' => envNonEmpty('MAIL_USERNAME','user@example.com'), + 'password' => envNonEmpty('MAIL_PASSWORD','password'), 'timeout' => null, 'verify_peer' => null !== env('MAIL_ENCRYPTION'), ], @@ -72,6 +72,11 @@ return [ 'channel' => env('MAIL_LOG_CHANNEL', 'stack'), 'level' => 'notice', ], + 'null' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL', 'stack'), + 'level' => 'notice', + ], 'array' => [ 'transport' => 'array',