Test your emails in Laravel

How to test your emails in your Laravel applications.


As developers, we always look for ways to improve our laravel products. To do so, we are constantly looking for ways to provide more value to our users and improve their experience.

Simply sending Emails is key ✨

Mailcatch is an excellent tool for testing emails. You can inspect and debug emails in dev, staging, and QA environments before sending them to recipients in production.


Setting up Mailcatch

  1. Sign up for a free Mailcatch.app.
  2. Create your first inbox.
  3. Head to settings and copy your smtp credentials.

Code Snippets

Laravel 9+

Laravel provides a clean, simple API over the popular Symfony Mailer library.

With the default Laravel setup you can configure your mailing configuration by setting these values in the .env file in the root directory of your project.

.env
MAIL_MAILER=smtp
MAIL_HOST=sandbox-smtp.mailcatch.app
MAIL_PORT=2525
MAIL_USERNAME=*************
MAIL_PASSWORD=*************

Laravel 7.x and 8.x

Laravel provides a clean, simple API over the popular Swift Mailer library.

With the default Laravel setup you can configure your mailing configuration by setting these values in the .env file in the root directory of your project.

.env
MAIL_MAILER=smtp
MAIL_HOST=sandbox-smtp.mailcatch.app
MAIL_PORT=2525
MAIL_USERNAME=*************
MAIL_PASSWORD=*************
MAIL_ENCRYPTION=tls