{"id":36977640,"url":"https://github.com/eventhomes/laravel-mandrillhooks","last_synced_at":"2026-01-13T22:46:52.079Z","repository":{"id":35219281,"uuid":"39478459","full_name":"eventhomes/laravel-mandrillhooks","owner":"eventhomes","description":"A simple Mandrill webhook base controller for catching bounced, rejected, etc mail events.","archived":false,"fork":false,"pushed_at":"2021-04-20T16:06:54.000Z","size":24,"stargazers_count":63,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-12-09T23:42:25.896Z","etag":null,"topics":["laravel","mandrill","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eventhomes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-22T01:25:25.000Z","updated_at":"2022-08-04T19:19:21.000Z","dependencies_parsed_at":"2022-09-16T15:21:48.406Z","dependency_job_id":null,"html_url":"https://github.com/eventhomes/laravel-mandrillhooks","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/eventhomes/laravel-mandrillhooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventhomes%2Flaravel-mandrillhooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventhomes%2Flaravel-mandrillhooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventhomes%2Flaravel-mandrillhooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventhomes%2Flaravel-mandrillhooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eventhomes","download_url":"https://codeload.github.com/eventhomes/laravel-mandrillhooks/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eventhomes%2Flaravel-mandrillhooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","mandrill","php"],"created_at":"2026-01-13T22:46:51.227Z","updated_at":"2026-01-13T22:46:52.067Z","avatar_url":"https://github.com/eventhomes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Mandrill Webhook Controller\n[![Latest Version](https://img.shields.io/github/release/eventhomes/laravel-mandrillhooks.svg?style=flat-square)](https://github.com/eventhomes/laravel-mandrillhooks/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/eventhomes/laravel-mandrillhooks.svg?style=flat-square)](https://packagist.org/packages/eventhomes/laravel-mandrillhooks)\n\nA simple Mandrill webhook controller to help with email events. Useful for notifying users that you cannot reach them via email inside your application. Compatible with Laravel 5+ and Lumen 5+.\n\n## Installation\n```composer require eventhomes/laravel-mandrillhooks```\n\n## Basic Usage\n\n1) Create a controller that extends MandrillWebhookController as follows. You can then handle any Mandrillapp webhook event.\n```php\nuse EventHomes\\Api\\Webhooks\\MandrillWebhookController;\n\nclass MyController extends MandrillWebhookController {\n\n    /**\n     * Handle a hard bounced email\n     *\n     * @param $payload\n     */\n    public function handleHardBounce($payload)\n    {\n        $email = $payload['msg']['email'];\n    }\n\n    /**\n     * Handle a rejected email\n     *\n     * @param $payload\n     */\n    public function handleReject($payload)\n    {\n        $email = $payload['msg']['email'];\n    }\n}\n```\n\n2) Create the route to handle the webhook. In your routes.php file add the following.\n```php\npost('mandrill-webhook', ['as' =\u003e 'mandrill.webhook', 'uses' =\u003e 'MandrillController@handleWebHook']);\n```\n3) [Exclude your route from CSRF protection](https://laravel.com/docs/5.4/csrf#csrf-excluding-uris) so it will not fail.\n\n4) Make sure you add your webhook in Mandrill to point to your route. You can do this here: https://mandrillapp.com/settings/webhooks\n\n## (Optional) Webhook Authentication\nIf you would like to increase the security of the webhooks. Add the *MandrillWebhookServiceProvider* provider to the providers array in config/app.php\n\n```php\n'providers' =\u003e [\n  ...\n  EventHomes\\Api\\Webhooks\\MandrillWebhookServiceProvider::class,\n],\n```\n\nNext, publish the configuration via\n```php\nphp artisan vendor:publish --provider=\"EventHomes\\Api\\Webhooks\\MandrillWebhookServiceProvider\"\n```\nSimply add your Mandrill webhook key in the config file and requests will be authenticated.\n\n## Webhook Events\n[Webhook event types](https://mandrill.zendesk.com/hc/en-us/articles/205583217-Introduction-to-Webhooks#event-types):\n\nEvent type              | Method             | Description\n------------            |------------        |---------------\nSent\t                | handleSend()       | message has been sent successfully\nBounced\t                | handleHardBounce() | message has hard bounced\nOpened\t                | hadleOpen()        | recipient opened a message; will only occur when open tracking is enabled\nMarked As Spam\t        | handleSpam()       | recipient marked a message as spam\nRejected\t            | handleReject()     | message was rejected\nDelayed\t                | handleDeferral()   | message has been sent, but the receiving server has indicated mail is being delivered too quickly and Mandrill should slow down sending temporarily\nSoft-Bounced\t        | handleSoftBounce() | message has soft bounced\nClicked\t                | handleClick()      | recipient clicked a link in a message; will only occur when click tracking is enabled\nRecipient Unsubscribes  | handleUnsub()      | recipient unsubscribes\nRejection Blacklist Changes\t| handleBlacklist()  | triggered when a Rejection Blacklist entry is added, changed, or removed\nRejection Whitelist Changes\t| handleWhitelist()  | triggered when a Rejection Whitelist entry is added or removed\n\n## Contributors\nSpecial thanks to @rafaelbeckel and @minioak!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventhomes%2Flaravel-mandrillhooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feventhomes%2Flaravel-mandrillhooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feventhomes%2Flaravel-mandrillhooks/lists"}