New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

actinity/mailtrapper

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actinity/mailtrapper

Mailtrapper for Laravel

Source
Packagist
Version
3.0
Version published
Total downloads
10K
Maintainers
0
Created
Source

Mailtrapper

This is a package for Laravel and Vue that captures emails generated by the framework and renders them into an onscreen email viewer.

Think Mailtrap, but inline within the application itself, with no need to login to a separate service.

What it does

Overrides the default mail transport in Laravel to save rendered emails to a database table.

The Recipient, Subject and HTML body are all captured.

The Vue component adds a mail icon at the top right, polls every few seconds for recent messages, and flashes when a new message is available.

Clicking on the icon opens an onscreen inbox. Because all emails are captured, this includes all emails generated to any recipient.

Requirements for use

  • Laravel 9+
  • Vue 3+
  • axios
  • A logged in user accessible at auth()->user() [DEFAULT]

Authentication

By default the library requires an authenticated user and uses the web middleware group. You can customise this by publishing the config and modifying the middleware to suit your needs.

Installation

composer require actinity/mailtrapper

Import the component from vendor/actinity/mailtrapper/src/components/Mailtrapper.vue

Add the <mailtrapper></mailtrapper> tag to a view or your main SPA component.

Run php artisan migrate to set up the table

Set MAIL_MAILER=trapper in your .env

Emptying the database

If you define a gate called mailtrapper:empty, the interface will include an 'Empty' button for matching users that allows them to empty the shared mailbox.

FAQs

Package last updated on 24 May 2026

Related posts