Setup Mailhog mail server on Ubuntu

How to setup Mailhog mail server on Ubuntu

install Go (since mailhog is written in Go)

sudo apt-get install golang-go
mkdir gocode
echo "export GOPATH=$HOME/gocode" >> ~/.profile
source ~/.profile

install mailhog

go get
go get

make binaries global - replace USERNAME with your OS username

sudo cp /home/USERNAME/gocode/bin/MailHog /usr/local/bin/mailhog
sudo cp /home/USERNAME/gocode/bin/mhsendmail /usr/local/bin/mhsendmail

install PHP

sudo apt install php7.2-cli

edit php.ini

cd /etc/php/7.2/cli/
nano php.ini

Start mailhog (manually): enter in terminal

mailhog \
  -api-bind-addr \
  -ui-bind-addr \

emails will appear in mailhog dashboard at the port address:




Post a Comment

Popular posts from this blog

Append to a json file python