Setup MailHog with Laravel valet localhost or Laravel Sail

brew install mailhog


Enable the service via running the command below:

brew services start mailhog# also you can stop it whenever you want using:brew services stop mailhog

This tells Homebrew to setup a background service. Then MailHog is always running on your machine. As long as Homebrew is running, you won’t need to manually start anything, .

Now, you can visit MailHog application under the following in a browser:

For localhost you need to set two variable in Laravel .env file.

Attention I:

If you are using Laravel Sail you should set


Otherwise it must be


Attention II:

The SMTP server is running on port 1025, where the HTTP server (which serves MailHog UI) is running on 8025.

Posting about Python and Laravel

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

New HTML5 Websites Are Reaping the Rewards

Web Design Photo From UnSplash

Expungement In Utah

utah expungment

Android-Kotlin: Clean Architecture using Repository and UseCases

NEW PRODUCT — Bangle.js

5427 iso ORIG 2022 01

Improve WordPress Search Function

Setting the internet on fire — Log4j vulnerability

Data Format Manipulation in DataWeave 2.0

Object Relational Mapping(ORM) — RUBY

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Posting about Python and Laravel

More from Medium

How to Create Table Using Laravel Migration?

Laravel resizes all images in a folder

What’s new in Laravel 8

Could Not Open Input File: Artisan In Laravel