Skip to content

Commit

Permalink
Update MAILER config to use mailpit on L11 (#678)
Browse files Browse the repository at this point in the history
* Update the .env with mailpit port

* Update the .env to use smtp mailer when mailpit is installed
  • Loading branch information
SamuelMwangiW committed Mar 8, 2024
1 parent cd032b0 commit e40cc7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Console/Concerns/InteractsWithDockerComposeServices.php
Expand Up @@ -185,7 +185,9 @@ 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);
}

file_put_contents($this->laravel->basePath('.env'), $environment);
Expand Down

0 comments on commit e40cc7f

Please sign in to comment.