Install Mailhog
brew update && brew install mailhog && brew services start mailhog
Check whether PHP can send mail
php -a
mail('test@test.com', 'subject', 'test');
Check http://0.0.0.0:8025/
If nothing appears the easiest way to fix this is to install MHSendmail
brew install go
go install github.com/mailhog/mhsendmail@latest
Get your php version and create a new file with respect to your version
php --ini
/usr/local/etc/php/X.X/conf.d/80-sendmail.ini
sendmail_path = /Users/xxxx/go/bin/mhsendmail
Restart PHP and try send mail again, it should work!
Top comments (0)