Download the PHP package henryavila/email-tracking without Composer

On this page you can find all versions of the php package henryavila/email-tracking. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package email-tracking

Laravel Email Tracking with Mailgun

Latest Version on Packagist Total Downloads Tests PHPStan Laravel Pint codecov License

Track email delivery, opens, clicks, and more using Mailgun webhooks. All data is stored in your database for easy querying and analytics.

✨ Features

πŸ“‹ Requirements

πŸ“Š Code Coverage

Coverage Graph

This package maintains high test coverage with comprehensive unit and integration tests. All new features are fully tested before release.

πŸ“¦ Installation

1. Install via Composer

2. Publish and Run Migrations

3. Publish Configuration (Optional)

4. Configure Mailgun

Setup Laravel Mail with Mailgun driver. See Laravel Mail Documentation.

Add to your .env file:

5. Setup Mailgun Webhook

In your Mailgun dashboard, add a webhook pointing to:

βš™οΈ Configuration

Register Event Listener

The package needs to listen for sent emails to track them.

Add to AppServiceProvider::boot():

Configuration File

The published config file (config/email-tracking.php) allows customization:

πŸš€ Usage

Basic Mailable with Tracking

Extend TrackableMail instead of Laravel's Mailable:

Send the email:

The email will be automatically tracked and linked to the $order model.

Trackable Notifications

For notifications, use TrackableNotificationMailMessage:

Email Type Classification (v7.0.0+)

Categorize emails for better organization and analytics.

1. Create Email Type Enum

2. Implement in Mailable

3. Query by Type

Learn more: See Email Type Classification Documentation for complete guide with examples.

Querying Emails

Email Analytics

πŸͺ Webhook Events

When Mailgun processes an email event (delivered, opened, clicked, etc.), the EmailWebhookProcessed event is dispatched.

Listening to Webhook Events

Create a listener:

Register the listener in EventServiceProvider:

Available Event Types

πŸ”§ Advanced Usage

Model Association

Add the trait to models that send emails:

Now you can access emails:

Custom Email Model

Extend the base Email model to add your own methods:

Use your custom model by binding it in a service provider:

πŸ“š Documentation

πŸ§ͺ Testing

πŸ“ Changelog

Please see CHANGELOG for more information on what has changed recently.

🀝 Contributing

Please see CONTRIBUTING for details.

πŸ”’ Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

πŸ™ Credits

πŸ“„ License

The MIT License (MIT). Please see License File for more information.


πŸ’‘ Upgrade Guides

Upgrading to 7.0.0 from 6.x - BREAKING CHANGES

Version 7.0.0 drops support for PHP 8.1 and Laravel 9-10.

Requirements

Why This Change?

Laravel 10 has reached end-of-life and contains known security vulnerabilities. This major version ensures your application uses secure, actively maintained Laravel versions.

Migration Path

Code Changes Required

If you were using Laravel 10's EventServiceProvider pattern, migrate to Laravel 11's AppServiceProvider:

Before (Laravel 10):

After (Laravel 11):

Testing

The package now uses:

All tests pass on PHP 8.2, 8.3, 8.4, and 8.5 with Laravel 11 and 12.


Upgrading to 6.2.0 from earlier versions (Legacy)

Note: If you're on v6.x, upgrade directly to v7.0.0 using the guide above.

A new migration was added to track email events.


πŸ†˜ Support

⭐ Show Your Support

Give a ⭐️ if this project helped you!


All versions of email-tracking with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^11.0|^12.0
spatie/laravel-permission Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package henryavila/email-tracking contains the following files

Loading the files please wait ...