Posts Learn Components Snippets Categories Tags Tools About
/

Setting up Mailpit for Laravel 10 Development

Get up and running with Mailpit for local Laravel development as an alternative to Mailtrap with ease

Created on Jul 11, 2023

2682 views

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}"

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

Load comments for Setting up Mailpit for Laravel 10 Development

)