Tinkerwell 4 is out now! Get the most popular PHP Scratchpad application. Learn more

Go back to Blog

Debug blade views in Laravel Mailables

Sebastian Schlein

Debugging emails can be cumbersome, especially if you don't know the exact data that a Mailable gets or which Blade views your application uses to render an email. HELO provides a helper package for Laravel that adds additional debug information to every email and makes debugging your emails as easy as it gets.

Install the HELO helper package

You can install the helper package via composer by running:

composer require --dev beyondcode/helo-laravel

Configure HELO

If you haven't already configured your application to use HELO as email provider, the configuration is straight forward: Set your mailer to SMTP on your local machine and you are ready to go. Using a username for the SMTP authentication creates a unique mailbox in HELO and makes it easy to separate emails between different applications. You can have as many inboxes as you need.

MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=2525
MAIL_USERNAME=HELO-Demo
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
[email protected]
MAIL_FROM_NAME="${APP_NAME}"

This is all you need to do to feed debug information into the debug tab of HELO. This is how it looks like:

HELO email debug information

If you are tired of triggering the email by going through the same process of your application over and over again, you can use Tinkerwell:

$body = 'This is a test message';

Mail::to(new User(['email' => '[email protected]']))->send(
    new App\Mail\MarkdownTestMail($body)
);

You can get HELO here.

Painless local email testing

HELO is a desktop application that will change the way you test your emails. No more broken links, missing images and customer complaints.

Learn more
Invoker screenshot