Good content takes time and effort to come up with.

Please consider supporting us by just disabling your AD BLOCKER and reloading this page again.

Testing Laravel Emails With MailHog

Testing Laravel Emails With MailHog

24th May 2021 2 mins read
Share On     Share On WhatsApp     Share On LinkedIn

Hey, guys hope you might have worked with Mailtrap and other various services to test the mail.

Sometimes you might have accidentally sent the test email to your clients and the issue might have got escalated sometimes. To overcome this kind of issue let's quickly install the MailHog in your local system.

We will cover the following topics

  1. Installation in Mac / Ubuntu
  2. Running MailHog From Terminal
  3. Configuration In Laravel
  4. Open Mails From Browser

Step 1 - Installation


brew update && brew install mailhog


sudo apt-get -y install golang-go
go get

You can find a whole bunch of Operating System supported downloads in this link MailHog GitHub Download

Step 2 - Running MailHog From Terminal

Just open your terminal and run the following command. It's that simple.


If you have installed it in some directory then it can be run with the following

Go to /path/to/MailHog in the command line. E.g. the path to Go's bin files on Ubuntu is ~/go/bin/, so to start the MailHog run:


Make sure not to close the terminal during the time your working with your mails.

Running MailHog From Terminal

Running MailHog From Terminal

Step 3 - Configuration In Laravel



Step 4 - Open Mails From Browser

NOTE: Make sure you are running the MailHog as show in Step 2

Go to the following URL in your browser


You will be able to see MailHog as shown below

MailHog In Browser

MailHog In Browser

Author Image

Channaveer Hakari

I am a full-stack developer working at WifiDabba India Pvt Ltd. I started this blog so that I can share my knowledge and enhance my skills with constant learning.

Never stop learning. If you stop learning, you stop growing