{"id":37233147,"url":"https://github.com/abrigham1/laravel-email-exceptions","last_synced_at":"2026-01-15T03:52:34.005Z","repository":{"id":16283346,"uuid":"79663191","full_name":"abrigham1/laravel-email-exceptions","owner":"abrigham1","description":"Email Exceptions package for Laravel 5.x","archived":false,"fork":false,"pushed_at":"2023-02-16T07:17:22.000Z","size":65,"stargazers_count":33,"open_issues_count":4,"forks_count":17,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-05T16:14:17.321Z","etag":null,"topics":["debugging","email","exception","exception-handling","laravel","laravel-5-package"],"latest_commit_sha":null,"homepage":null,"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/abrigham1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-21T18:08:03.000Z","updated_at":"2023-11-28T03:40:40.000Z","dependencies_parsed_at":"2024-06-19T09:54:33.265Z","dependency_job_id":"9283830a-6fa3-4f5f-8679-377c04204eff","html_url":"https://github.com/abrigham1/laravel-email-exceptions","commit_stats":{"total_commits":41,"total_committers":5,"mean_commits":8.2,"dds":"0.19512195121951215","last_synced_commit":"b29c3e4c9bf0eed29c0720261ee3844975467d3c"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/abrigham1/laravel-email-exceptions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrigham1%2Flaravel-email-exceptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrigham1%2Flaravel-email-exceptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrigham1%2Flaravel-email-exceptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrigham1%2Flaravel-email-exceptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abrigham1","download_url":"https://codeload.github.com/abrigham1/laravel-email-exceptions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abrigham1%2Flaravel-email-exceptions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["debugging","email","exception","exception-handling","laravel","laravel-5-package"],"created_at":"2026-01-15T03:52:33.415Z","updated_at":"2026-01-15T03:52:33.973Z","avatar_url":"https://github.com/abrigham1.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel 7.x Email Exceptions\n[![Build Status](https://api.travis-ci.org/abrigham1/laravel-email-exceptions.png?branch=master)](https://travis-ci.org/abrigham1/laravel-email-exceptions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/abrigham1/laravel-email-exceptions/master.svg)](https://codecov.io/github/abrigham1/laravel-email-exceptions?branch=master)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)\n\nThe Laravel 5 Email Exceptions package, based on this excellent cakephp package (https://github.com/ebrigham1/cakephp-error-email), is designed to give developers an easy way to email debug information\nto themselves whenever an exception is thrown in their application. Information provided by default is:\n* Environment\n* Exception/Error Url\n* Exception/Error Class\n* Exception/Error Message\n* Exception/Error Code\n* File and Line Number\n* Stack Trace\n\n![Screenshot](https://cloud.githubusercontent.com/assets/7387512/22176626/047ac836-dfdd-11e6-9a91-bb99b98333ac.png)\n\n## Table of Contents\n* [Installation](#installation)\n* [Configuration](#configuration)\n* [Basic Usage](#basic-usage)\n    * [Basic Config](#basic-config)\n    * [Throttling](#throttling)\n    * [Global Throttling](#global-throttling)\n* [Advanced Usage](#advanced-usage)\n\t* [Changing the view](#changing-the-view)\n\t* [Adding Arbitrary don't email logic](#adding-arbitrary-dont-email-logic)\n* [Gotchas](#gotchas)\n* [Bugs and Feedback](#bugs-and-feedback)\n* [License](#license)\n\n## Installation\nYou can install this plugin into your laravel 5.x application using [composer](http://getcomposer.org).\n\nRun the following command\n```bash\ncomposer require abrigham/laravel-email-exceptions\n ```\nAfter updating composer, add the service provider to the providers array in config/app.php\n\u003e If you are in laravel \u003e= 5.5 you can skip adding the provider to config/app.php as it will be auto-discovered\n\n```php\nAbrigham\\LaravelEmailExceptions\\EmailExceptionsServiceProvider::class,\n```\n\nThen in app/Exceptions/Handler.php replace\n```php\nuse Illuminate\\Foundation\\Exceptions\\Handler as ExceptionHandler;\n```\nwith\n```php\nuse Abrigham\\LaravelEmailExceptions\\Exceptions\\EmailHandler as ExceptionHandler;\n```\n\n## Configuration\nTo publish the config file and view run the following command\n```bash\nphp artisan vendor:publish --provider=\"Abrigham\\LaravelEmailExceptions\\EmailExceptionsServiceProvider\"\n```\n\nThat will create a config file for you in config/laravelEmailExceptions.php and a view in\nresources/views/vendor/laravelEmailExceptions/emailExceptions.blade.php\n\nDefault configuration:\n```php\n'ErrorEmail' =\u003e [\n    'email' =\u003e true,\n    'dontEmail' =\u003e [],\n    'throttle' =\u003e false,\n    'throttleCacheDriver' =\u003e env('CACHE_DRIVER', 'file'),\n    'throttleDurationMinutes' =\u003e 5,\n    'dontThrottle' =\u003e [],\n    'globalThrottle' =\u003e true,\n    'globalThrottleLimit' =\u003e 20,\n    'globalThrottleDurationMinutes' =\u003e 30,\n    'toEmailAddress' =\u003e null,\n    'fromEmailAddress' =\u003e null,\n    'emailSubject' =\u003e null\n]\n```\n\n* email (bool) - Enable or disable emailing of errors/exceptions\n* dontEmail (array) - This works exactly like laravel's $dontReport variable documented here: https://laravel.com/docs/5.4/errors#the-exception-handler under Ignoring Exceptions By Type. Keep in mind also any exceptions under laravel's $dontReport also will not be emailed\n* throttle (bool) - Enable or disable throttling of exception emails. Throttling is only performed if its been determined the exact same exception/error has already been emailed by checking the cache. Errors/Exceptions are determined to be unique by exception class + exception message + exception code\n* throttleCacheDriver (string) - The cache driver to use for throttling, by default it uses CACHE_DRIVER from your env file\n* throttleDurationMinutes (int) - The duration in minutes of the throttle for example if you put 5 and a BadMethodCallException triggers an email if that same exception is thrown again it will not be emailed until 5 minutes have passed\n* dontThrottle (array) - This is the same as dontEmail except provide a list of exceptions you do not wish to throttle ever even if throttling is turned on\n* globalThrottle (bool) - Enable or disable whether you want to globally throttle the number of emails you can receive of all exception types by this application\n* globalThrottleLimit (int) - The the maximum number of emails you want to receive in a given period.\n* throttleDurationMinutes (int) - The duration in minutes of the global throttle for example if you put in 30 and have 10 for your globalThrottleLimit when the first email is sent out a 30 minute timer will commence once you reach the 10 email threshold no more emails will go out for that 30 minute period. \n* toEmailAddress (string|array) - The email(s) to send the exceptions emails to such as the dev team dev@yoursite.com\n* fromEmailAddress (string) - The email address these emails should be sent from such as noreply@yoursite.com.\n* emailSubject (string) - The subject of email, leave NULL to use default Default Subject: An Exception has been thrown on APP_URL APP_ENV\n\n**Note:** the dontReport variable from **app/Exceptions/Handler.php** file will also not be emailed as it's assumed if they are not important enough to log then they also are not important enough to email\n\n**Important:** You must fill out a toEmailAddress and fromEmailAddress or you will not receive emails.\n\n## Basic Usage\n#### Basic Config\nUpdate your config values in **config/laravelEmailExceptions.php**\n```php\n'ErrorEmail' =\u003e [\n    'email' =\u003e true,\n    'dontEmail' =\u003e [],\n    'throttle' =\u003e true,\n    'throttleCacheDriver' =\u003e env('CACHE_DRIVER', 'file'),\n    'throttleDurationMinutes' =\u003e 5,\n    'dontThrottle' =\u003e [],\n    'globalThrottle' =\u003e true,\n    'globalThrottleLimit' =\u003e 20,\n    'globalThrottleDurationMinutes' =\u003e 30,\n    'toEmailAddress' =\u003e 'dev@yoursite.com',\n    'fromEmailAddress' =\u003e 'noreply@yoursite.com',\n    'emailSubject' =\u003e null,\n]\n```\n\n#### Throttling\nBoth throttling and global throttling are put in place in an attempt to prevent spam to the dev team. Throttling works\nby creating a unique cache key made from exception class + exception message + exception code. Its aim is to prevent duplicate\nexceptions from being reported via email giving the team time to fix them before they are reported again.\n\n#### Global Throttling\nGlobal throttling is a similar idea except it's put in place to prevent more then a certain number of emails going out \nwithin a given time period. This should typically only be necessary for an app wide failure ex major portions of the\nsite are down so many varied types of exceptions are coming in from all directions.\n\n## Advanced Usage\n### Changing the view\nIf you published your view using the command above you will be able to change the look of the exception email\nby modifying your view in **resources/views/vendor/laravelEmailExceptions/emailException.blade.php**\n\n### Adding Arbitrary don't email logic\nIf you need more complicated logic then just checking instanceof against the thrown exception\nthere is a convenient hook for adding arbitrary logic to decide if an exception should be emailed.\n\nIn **app/Exceptions/Handler.php** implement the function appSpecificDontEmail(Exception $exception) ex.\n\n```php\n\u003c?php\nclass Handler extends ExceptionHandler\n{\n    protected function appSpecificDontEmail(Exception $exception)\n    {\n        // add logic here to determine if exception should be emailed return true\n        // if it should and return false if it should not\n    }\n}\n```\n## Gotchas\nIf you're having trouble getting this working first make sure you have configured your\napplication to send mail correctly. One of the easiest ways to get mail up and running \nis by signing up for a free account on [mailtrap.io](https://mailtrap.io). Once you've done that you'll have \nto update your .env file with values like these replacing the username and password \nwith those listed in your demo inbox\n```\nMAIL_DRIVER=smtp\nMAIL_HOST=smtp.mailtrap.io\nMAIL_PORT=2525\nMAIL_USERNAME=your-user-string\nMAIL_PASSWORD=your-password-string\nMAIL_ENCRYPTION=null\n```\n\n## Bugs and Feedback\nhttp://github.com/abrigham1/laravel-email-exceptions/issues\n\n## License\nCopyright (c) 2017 Aaron Brigham\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrigham1%2Flaravel-email-exceptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabrigham1%2Flaravel-email-exceptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabrigham1%2Flaravel-email-exceptions/lists"}