Download the PHP package darshan/exceptionemail without Composer

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

Laravel Exception Notifications

An easy-to-use package for sending email notifications with stack traces whenever an exception occurs in your Laravel application.

Installation Guide

1. Install via Composer

To install the package, run the following Composer command:

2. Configure Laravel

Breaking Changes for Laravel 11: Exception Handling in a Custom Service Provider

In Laravel 11, exception handling logic should be placed in a custom service provider. Follow these steps to set it up:

  1. Create a Custom Service Provider:

Create a new service provider that will handle exceptions in your application. Add the following code in app/Providers/ExceptionServiceProvider.php:

  1. Register the Service Provider:

In bootstrap/providers.php, register your custom ExceptionServiceProvider by adding it to the providers array:

Add ExceptionEmail's Exception Capturing (for version of Laravel below 11 like 8,9,10)

In order to capture exceptions and send emails (for Laravel versions prior to 11 or if you prefer using Handler.php), modify the report method in your app/Exceptions/Handler.php file:

3. Publish the Configuration File

Publish the ExceptionEmail configuration file by running the following Artisan command:

This will create a configuration file at config/exceptionemail.php.

Configuration

Silent Mode

By default, the package is configured with 'silent' => true to prevent sending exception emails in development environments, especially when 'debug' => true is enabled in Laravel.

You can control this behavior with the following configuration option:

To enable email notifications when exceptions occur, set IS_EXCEPTION_EMAIL_SILENT=false in your .env file.

Capture Exceptions

You can specify which types of exceptions should trigger email notifications. By default, the package includes Symfony\Component\Debug\Exception\FatalErrorException::class.

To capture all exceptions, you can use the wildcard '*':

Ignored Exceptions

You may define exceptions that should not trigger email notifications. This is done by adding them to the ignored_exception array.

For example, to ignore FatalErrorException, use the following:

Usage in Handler.php

Update the report method in app/Exceptions/Handler.php to incorporate ignored exceptions:

Recipients

Specify the email addresses that should receive the exception notifications by updating the to array:

Ignored Bots

You can configure the package to ignore errors triggered by bots, like search engine crawlers. The default configuration includes common bots such as:

Customizing Emails

To customize the subject and body of the error notification emails, publish the email templates by running:

Note: Only run this command once to avoid overwriting custom changes.

The email views will be published to resources/views/vendor/exceptionemail. You can modify the templates as needed, and you have access to the $exception object in the views.

Testing the Integration

To verify that ExceptionEmail is correctly set up and working, use the following Artisan command:

This command will throw a Webmonks\ExceptionEmail\Exceptions\DummyException, and the package will capture and send it as an email. If everything is set up correctly, you should receive the test email.

Security

If you discover any security issues, please contact us directly via email at [email protected], rather than opening an issue on GitHub.

Credits

About Webmonks

Webmonks is a product development startup based in Ahmedabad, India. You can explore all our open-source projects on GitHub.

License

This package is open-sourced software licensed under the MIT License.


All versions of exceptionemail with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 || ^8.0
illuminate/support Version 8.*|9.*|10.*|11.*
illuminate/view Version 8.*|9.*|10.*|11.*
illuminate/config Version 8.*|9.*|10.*|11.*
illuminate/mail Version 8.*|9.*|10.*|11.*
illuminate/log Version 8.*|9.*|10.*|11.*
illuminate/queue Version 8.*|9.*|10.*|11.*
illuminate/console Version 8.*|9.*|10.*|11.*
symfony/error-handler Version ~5.1|~6.0|~7.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 darshan/exceptionemail contains the following files

Loading the files please wait ....