From f29ebd14e942a05ab7b938f586003e08550e1b6a Mon Sep 17 00:00:00 2001 From: Samuel Mwangi Date: Fri, 8 Mar 2024 00:47:51 +0300 Subject: [PATCH] Update the .env to use smtp mailer when mailpit is installed --- src/Console/Concerns/InteractsWithDockerComposeServices.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Console/Concerns/InteractsWithDockerComposeServices.php b/src/Console/Concerns/InteractsWithDockerComposeServices.php index 26ebe0a7..258738c6 100644 --- a/src/Console/Concerns/InteractsWithDockerComposeServices.php +++ b/src/Console/Concerns/InteractsWithDockerComposeServices.php @@ -185,6 +185,7 @@ protected function replaceEnvVariables(array $services) } if (in_array('mailpit', $services)) { + $environment = preg_replace("/^MAIL_MAILER=(.*)/m", "MAIL_MAILER=smtp", $environment); $environment = preg_replace("/^MAIL_HOST=(.*)/m", "MAIL_HOST=mailpit", $environment); $environment = preg_replace("/^MAIL_PORT=(.*)/m", "MAIL_PORT=1025", $environment); }