#Prerequisit
cd ~
curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
tar xvf go1.6.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo mv go /usr/local
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
mkdir ./work
#Install MailHog
Main GitHub repo
Download link for MailHog
cd ~/
wget https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/bin/mailhog
#Install mhsendmail, sendmail replacement for MailHog
GitHub repo
sudo go get github.com/mailhog/mhsendmail
This will install mhsendmail to ~/go/bin/mhsendmail, to insatll globally
sudo ln ~/work/bin/mhsendmail /usr/bin/mhsendmail
sudo ln ~/work/bin/mhsendmail /usr/bin/sendmail
sudo ln ~/work/bin/mhsendmail /usr/bin/mail
#Configure PHP Add following line to php.ini
sendmail_path = /usr/bin/mhsendmail
thanks but perhaps several things
export with $ won't work
cd is equal to cd ~/
missing this sudo chmod +x /usr/bin/mailhog
and how to start the process