Setup MailHog with Laravel valet localhost or Laravel Sail

brew install mailhog

Enabling:

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:

http://127.0.0.1:8025/

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

Attention I:

If you are using Laravel Sail you should set

MAIL_HOST=mailhog

Otherwise it must be

MAIL_HOST=localhost

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

Part 4. Create a simple web application using Rails framework

HOW TO MASTERED IN Graph DSA.

AWS SAA-C02 — Snowball & Storage Gateway

Getting perspective from history to understand what is DevOps

Road to Production-Ready Application — I (Code Structure in Flutter)

GitLab VS GitHub

Best practices for REST Assured

Top 10 Programming Languages For Mobile App And Its Differences

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
Panjeh

Panjeh

Posting about Python and Laravel

More from Medium

Laravel Telescope

Carbon Add Years To Date In Laravel

Detailed Guide on Laravel Development Proces

How to upload your Laravel Website on Cpanel