Skip to content

Commit

Permalink
[TASK] Check env before activating mailhog
Browse files Browse the repository at this point in the history
  • Loading branch information
o-ba committed Oct 28, 2022
1 parent 2e4d0c6 commit 79d8d2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ public function useDDEVConfiguration(string $dbHost = null): self
'user' => 'db',
]
)
->useImageMagick()
->useMailhog((string)getenv('MH_SMTP_BIND_ADDR'));
->useImageMagick();

$mailhogSmtpBindAddr = getenv('MH_SMTP_BIND_ADDR');
if (is_string($mailhogSmtpBindAddr) && $mailhogSmtpBindAddr !== '') {
$this->useMailhog($mailhogSmtpBindAddr);
}

return $this;
}

Expand Down

0 comments on commit 79d8d2d

Please sign in to comment.