From 3543d7c33d4d93def162d5e390e9c0ae09d7fd0d Mon Sep 17 00:00:00 2001 From: Trankten <86560527+trankten@users.noreply.github.com> Date: Wed, 28 Dec 2022 11:24:48 +0100 Subject: [PATCH 1/2] Update mail.php Adding compatibility with Google Workspaces SMTP Relay. More info can be found here: https://support.google.com/a/answer/2956491 --- config/mail.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/config/mail.php b/config/mail.php index 0951a33fd..2e88c824d 100644 --- a/config/mail.php +++ b/config/mail.php @@ -85,8 +85,21 @@ return [ */ 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), + + + /* + |-------------------------------------------------------------------------- + | SMTP EHLO Domain + |-------------------------------------------------------------------------- + | + | Some SMTP servers require to present a known domain in order to + | allow sending through its relay. (ie: Google Workspace) + | This will use the MAIL_SMTP_EHLO env variable to avoid the 421 error + | if not present by authenticating the sender domain instead the host. + | + */ + 'local_domain' => ENV('MAIL_SMTP_EHLO'), /* |-------------------------------------------------------------------------- From c895150ed51a223ee5dae455ee0aa7bdaa76523d Mon Sep 17 00:00:00 2001 From: Trankten <86560527+trankten@users.noreply.github.com> Date: Wed, 28 Dec 2022 11:31:47 +0100 Subject: [PATCH 2/2] Update mail.php lowercase ENV --- config/mail.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mail.php b/config/mail.php index 2e88c824d..262611d9b 100644 --- a/config/mail.php +++ b/config/mail.php @@ -99,7 +99,7 @@ return [ | if not present by authenticating the sender domain instead the host. | */ - 'local_domain' => ENV('MAIL_SMTP_EHLO'), + 'local_domain' => env('MAIL_SMTP_EHLO'), /* |--------------------------------------------------------------------------