Download the PHP package biegalski-llc/laravel-mailgun-webhooks without Composer

On this page you can find all versions of the php package biegalski-llc/laravel-mailgun-webhooks. 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 laravel-mailgun-webhooks

New Package

This package, Laravel-Mailgun-Webhooks, has been superseded by a new and improved solution: Notification-Tracker.

Notification-Tracker offers a more robust, flexible, and maintainable way to handle webhook notifications. We strongly encourage all users to migrate to the new package.

This repository will remain available for reference, but it will no longer be actively maintained.

Thank you for your understanding.

Mailgun Webhooks for Laravel

Tracking

This package allows you to quick and easily integrate your Laravel application with Mailgun Webhooks thus allowing you to track the outgoing email status for each individual user.

This may be useful information you want to display to your end users or to a certain subset of users (Managers, Moderators, Admins, etc...).

Email Content Storage

This package will also store the content of the emails sent if you need to reference them at any point in the future. There are many use-cases for why this information is valuable.

Alerts

This package allows gives you the ability to set it up so that you receive alerts for specific things. You have the ability to turn on and off the type of notifications you want to receive.

Installation Instructions

Lets begin the installation. First you'll need to install the package with composer.

composer require biegalski-llc/laravel-mailgun-webhooks

Next, you will want to publish the configuration and view files.

php artisan vendor:publish --tag=mailgun_webhook_config

php artisan vendor:publish --tag=mailgun_webhook_view

DotEnv Configuration Options

Below you will find various options to configure this plugin to your needs.

Options

Turn on and off certain features of this package

Notifications

Turn on and off various notifications and set who these notifications send to.

Content Logging

Storing all content can quickly build up disk space used. Turn on and off various pieces of content to store. Only store what you need! body_html by default is true, the rest by default are false.

Custom Database Connection

Storing all of these mailgun notifications in another database? Specify which database connection to use.

User Model

By default - we reference the App\Users model to form the relationship. If you use a custom model or have made changes to the User model - you may need to add and edit these variables to your dotenv as well:

Signing Key

Mailgun allows you to set an HTTP webhook signing key, which can be different from the API key value set in the MAILGUN_SECRET environment variable used to connect to the Mailgun API for sending. This is especailly useful if you use Domain level sending API keys or have rotated the HTTP Webhook signing key. Defaults to the MAILGUN_SECRET value.

After you've completed the configuration - lets re-cache it:

php artisan config:cache

Now, you'll need to run the database migrations:

php artisan migrate

And, finally, you'll need to add a middleware to the route middleware group. In app\Http\Kernel.php add the following line to the routeMiddleware group:

'mailgun_webhooks' => \Biegalski\LaravelMailgunWebhooks\Middleware\ValidateMailgunWebhook::class,

You're all set! Now you just need to add the API endpoints to the webhooks in your Mailgun account.

Add Webhooks In Mailgun

  1. Login
  2. Navigate to Sending -> Webhooks
  3. Click Add Webhook button
  4. Select the appropriate Event Type and input its corresponding API endpoint. Endpoints listed below:
Event Type Endpoint URL
Clicks https://domain.com/api/mg-webhooks/clicked
Delivered Messages https://domain.com/api/mg-webhooks/delivered
Opened Messages https://domain.com/api/mg-webhooks/opened
Permanent Failure https://domain.com/api/mg-webhooks/perm-failure
Spam Complaints https://domain.com/api/mg-webhooks/spam
Temporary Failure https://domain.com/api/mg-webhooks/temp-failure
Unsubscribes https://domain.com/api/mg-webhooks/unsubscribe

*Replace "https://domain.com" with your applications URL.

Usage

It starts collecting data and sending notifications after configuration is setup. You can dive deeper and extract or display this data. Usage steps for that coming soon!

Affiliations

I have no affiliation with Laravel or Mailgun. Both are just frequently used in projects I am involved in and this package fills a need across various projects.

Translations

There is currently 9 translations:

More languages coming soon!

If you're unsure how localization works in Laravel, please reference the documentation at https://laravel.com/docs/master/localization

Contributing

Please see CONTRIBUTING for details.

Credits

License

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


All versions of laravel-mailgun-webhooks with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
guzzlehttp/guzzle Version ^6.2 || ^7.0.1
ext-json Version *
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 biegalski-llc/laravel-mailgun-webhooks contains the following files

Loading the files please wait ....