I needed to configure PHP + Valet to send any and all emails to Mailhog. This is how I configured my system:
Basically:
brew install mailhog
brew services start mailhog
Then in /opt/homebrew/etc/php/<VERSION>/conf.d/z-php.ini
Add:
sendmail_path=/opt/homebrew/bin/mailhog sendmail
Then:
brew services restart php
valet restart
...and if you are using valet isolate
in a specific site, also:
valet isolate php@<VERSION>
This should tell that version of PHP to send ANY email via /opt/homebrew/bin/mailhog sendmail
which should end up in the Mailhog UI at http://127.0.0.1:8025
.
You can also:
valet proxy mailhog.test http://127.0.0.1:8025
And use mailhog.test
to access Mailhog.
Latest comments (0)