Download the PHP package michaelgrimshaw/laravel-email-tracker without Composer
On this page you can find all versions of the php package michaelgrimshaw/laravel-email-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download michaelgrimshaw/laravel-email-tracker
More information about michaelgrimshaw/laravel-email-tracker
Files in michaelgrimshaw/laravel-email-tracker
Package laravel-email-tracker
Short Description A package to track sent mail and listen to webhook events
License MIT
Homepage https://github.com/michaelgrimshaw/laravel-email-tracker
Informations about the package laravel-email-tracker
Laravel Email Tracker
This package allows you to track sent mail and query sent mail statistics.
Once installed you can do stuff like this:
By adding a trait you can access history sending history for a recipient or model.
Installation
Laravel
This package can be used in Laravel 5.5 or higher.
You can install the package via composer:
In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php
file:
You can create the mail history tables by running the migrations:
You can publish the config file with:
Usage
First, add the MichaelGrimshaw\MailTracker\TrackableTrait
trait to your User
model(s) and link model(s):
Methods
This now gives you access to extra functions when sending which can be used to control the tracking.
Pass in a model object to link the mail.
Pass a string to add a category to the tracked mail.
As default, mail will always be tracked. You can use the tracked method to turn tracking on or off.
Tracking Events
The default webhook url is /api/email-tracker/event-hook. You can customise the route:
When the webhook is processed one of the following events are called:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.