Catch emails when in development using Mailtrap fake smtp testing server

David Carr

Development Nova Framework Tools

During the development phase it’s important to test sending emails without sending to end users or clients that’s where Mailtrap comes in. Mailtrap allows you to send emails without fear of spamming your customers. The emails will be sent Mailtrap where you can see emails sent from your site and inspect them. 

The advantages of routing all emails to Mailtrap is you can deep test your emails, Mailtrap also gives you a spam score and analysis.

Integrating is extremely easy by sending emails via SMTP, for instance with Nova Framework integration can be done like this:

return array(
  "driver" => "smtp",
  "host" => "smtp.mailtrap.io",
  "port" => 2525,
  "from" => array(
      "address" => "[email protected]",
      "name" => "Example"
  ),
  "username" => "username here",
  "password" => "password here",
  "sendmail" => "/usr/sbin/sendmail -bs",
  "pretend" => false
);

Get started by going to https://mailtrap.io/

Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!

Sponsor

My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Fathom Analytics $10 discount on your first invoice using this link

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.