Download the PHP package azine/mailgunwebhooks-bundle without Composer

On this page you can find all versions of the php package azine/mailgunwebhooks-bundle. 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 mailgunwebhooks-bundle

AzineMailgunWebhooksBundle

Symfony Bundle to capture event data from the Mailgun.com transactional mail service.

If you are using a free mailgun.com account (less than 10'000 email per month), then mailgun.com deletes log-entries about events after about 48 hours.

So if you want to check who recieved the newsletter you sent last week, your busted. :-(

Mailgun.com offeres the cool feature to post the event data to an URL of your choice. => see http://documentation.mailgun.com/user_manual.html#webhooks for more details.

This bundle captures this data. You can search for, filter and display log-entries and delete them when you don't need them anymore (or when you need to save some disk-space).

Features

Installation

To install AzineMailgunWebhooksBundle with Composer just add the following to your composer.json file:

Then, you can install the new dependencies by running Composer’s update command from the directory where your composer.json file is located:

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

Register the routes of the AzineMailgunWebhooksBundle:

Configuration options

This is the complete list of configuration options with their defaults.

Sidenote on "monolog" emails and web scanners

You can configure monolog to send emails whenever an error occurs. => http://symfony.com/doc/current/cookbook/logging/monolog_email.html

It is likely that many 404-errors occur on you site because web-scanners try to see if you are hosting vulnerable scripts on your server. If these errors are mailed via mailgun.com as well, you might send a lot more mails than you want to (and exceed the limit of 10k free emails) and it
will clutter you database with more or less useless information.

Since Symfony 2.4, to avoid these emails being sent, you can configure monolog to ignore certain 404 errors. => http://symfony.com/doc/current/cookbook/logging/monolog_regex_based_excludes.html

Webhooks configuration of mailgun.com

To tell mailgun.com to post the data to your database via the webhooks, just get the full url of the "mailgunevent_webhook"-route

and copy it to all the input fields for the webhooks on https://mailgun.com/app/webhooks

Then test if everything is setup ok by clicking the "Test" or "Send" button and check you database or the event-list.

Events

Whenever mailgun posts an event via the webhook, an MailgunWebhookEvent containing the new MailgunEvent is dispatched.

You can implement your own means of notification for failures or if you configured your application to use the swiftmailer, you can use the SwiftMailerMailgunWebhookEventListener, to send emails to an address you specified.

Cli Commands

This bundle offers two commands for you to automate things via a scheduler (cronjob).

Delete old MailgunEvents

If you only want to keep mailgun events younger than date string, to prevent your database of running full, you can run the command via scheduler/cronjob.

Check if Sending IP is on Black-Lists

If the IP address, your emails are sent from, gets listed on a SPAM block-list, your email deliverability drops drastically. To be able to be notified a.s.a.p. you can run this command to check the last IP, that was used for sending your emails, against hetrixtools.com. If the IP is listed, the administrator will receive an email.

With the parameter numberOfAttempts you can specify how many times the command should try to get the hetrixtools report, if an attempt fails for any reason.

HetrixTools.com has a free, limited plan that will allow ~3 checks per day. See https://hetrixtools.com/pricing/blacklist-monitor/ for details.

You can set the parameter repeat_notification_after_days in your app/config/config.yml to a non-zero integer to mute the notification email for a number of days if no change in the list of blacklistings has occured. You will only get the blacklist notification email again once either the mute-duration has passed or your ip has been been added to or removed from a blacklist.

Contribute

Contributions are very welcome. Please fork the repository and issue your pull-request against the master branch.

The PR should:

Code style

You can check the code style with the php-cs-fixer. Optionally you can set up a pre-commit hook which contains the php-cs-fixer check. Also see https://github.com/FriendsOfPHP/PHP-CS-Fixer

All you have to do is to move pre-commit.sample file from commit-hooks/ to .git/hooks/ folder and rename it to pre-commit.

php-cs-fixer will check the style of your new added code each time you commit and apply fixes to the commit.

To run php-cs-fixer manually, install dependencies (composer install) and execute php vendor/friendsofphp/php-cs-fixer/php-cs-fixer --diff --dry-run -v fix --config=.php_cs.dist .

ToDos

Here's a list of open TODOs

Build-Status ec.

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality Code Coverage


All versions of mailgunwebhooks-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-mailparse Version *
symfony/framework-bundle Version ^3.3|^4.0
symfony/config Version ^3.3|^4.0
symfony/console Version ^3.3|^4.0
symfony/dependency-injection Version ^3.3|^4.0
symfony/dom-crawler Version ^3.3|^4.0
symfony/event-dispatcher Version ^3.3|^4.0
symfony/http-foundation Version ^3.3|^4.0
symfony/http-kernel Version ^3.3|^4.0
symfony/yaml Version ^3.3|^4.0
symfony/process Version ^3.3|^4.0
symfony/routing Version ^3.3|^4.0
symfony/translation Version ^3.3|^4.0
twig/twig Version >=1.34
twig/extensions Version ~1.0
doctrine/orm Version ~2.2,>=2.2.3
doctrine/common Version ~2.2,>=2.2.3
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 azine/mailgunwebhooks-bundle contains the following files

Loading the files please wait ....