Last active
July 26, 2023 06:20
-
-
Save gh-darvishani/f8b31156222125dcb6e1a93418b6fb1e to your computer and use it in GitHub Desktop.
install MailHog , php , brew ,go ,mhsendmail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install mail-hog: | |
brew install mailhog | |
#install go-lang | |
brew install go | |
#install mhsendmail | |
go install github.com/mailhog/mhsendmail@latest | |
#change php config | |
find php.ini | |
php -i | grep 'php.ini' | |
nano /opt/homebrew/etc/php/7.4/php.ini : | |
SMTP = 0.0.0.0 | |
smtp_port = 1025 | |
sendmail_from = [email protected] | |
sendmail_path = /usr/bin/env /Users/<your-username>/go/bin/mhsendmail -f [email protected] | |
#restart php & apache (httpd) : | |
sudo apachectl restart | |
brew services restart [email protected] | |
#open: | |
http://127.0.0.1:8025/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use php mail function to send mail :
mail("[email protected]","My subject","test from your macbook")