Home / Snippets / Setting up Mailpit for Laravel 10 Development
Setting up Mailpit for Laravel 10 Development cover

Setting up Mailpit for Laravel 10 Development

3.8K

1 year ago

0 comments

It's been a while everyone! In this short snippet, we'll be going through on setting up Mailpit for Laravel 10 development. Let's get started.

What is Mailpit?


"Mailpit is a multi-platform email testing tool & API for developers. It acts as both an SMTP server and provides a web interface to view all captured emails. It also contains an API for automated integration testing."

Install Mailpit via HomeBrew


To install Mailpit on macOS you can use HomeBrew. First, tap in to "axllent/apps".
brew tap axllent/apps

Then you can run the following command to install Mailpit
brew install mailpit

Install Mailpit with Curl for Mac or Linux


If you are not using HomeBrew you can make use of the "curl" command which also supports Linux.
sudo bash < <(curl -sL https://raw.githubusercontent.com/axllent/mailpit/develop/install.sh)

Install from Release for All Platform


Other than the 2 installation methods above, you may also download the release and install it. Mailpit from release.

Update environment file for Laravel


Finally you need to update the Laravel environment configuration as follows.
MAIL_MAILER=smtp
MAIL_HOST=localhost
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"
notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this