Sends email notifications when application errors (exceptions) occur. Its easy configuration allows you to set which environments to enable for the notifications. The details about the thrown exceptions are sent via email.

The sfErrorNotifierPlugin sends automatically email notifications when application errors (exceptions) occur and are not caught.
Optionally, it will send notifications also for PHP Fatal Errors and/or PHP Warnings.

Its easy configuration allows you to set which environments to enable for the notifications.

The details about the thrown exceptions and other useful parameters are sent via email.

NEW! It is also possible to trigger notifications explicitly from anywhere in your code (the email will be sent only from the environments enabled for the notifications)

NEW! You can specify a mailer function (or method) to use rather than the native PHP mail method

NEW! It work on Symfony 1.2, 1.3 and 1.4

Brought to you by Plancake (http://www.plancake.com): your online task manager is now free and Opensource (and built on Symfony)

For any problem or question, ask the official forum hosted by the Plancake project:
http://www.plancake.com/forums/forum/10/sferrornotifierplugin/

Developers

License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release 1.0.0 - 26/04/2009

sfErrorNotifierPlugin plugin

Its easy configuration allows you to set which environments to enable for the notifications.

The details about the thrown exceptions and other useful parameteers are sent via email.

NEW! It is also possible to trigger notifications explicitly by using this line anywhere in your code (the email will be sent only from the environments enabled for the notifications):

sfErrorNotifier::alert('Message To Send With The Alert')

Installation

Install the plugin

symfony plugin:install sfErrorNotifierPlugin

In the file /plugins/sfErrorNotifierPlugin/config/app.yml, set the email address(es) to deliver the notifications to, for the environments you want to enable (tipically only 'prod').
You can comma-separate multiple recipients.

prod:
sfErrorNotifier:
email: errors@mysite.com

In this configuration file, you can also set the format of the email (html or txt) and, optionally, the From: field for the email.

Clear the cache

symfony cc

Some users have mentioned they needed to override the default error page in order to get this plugin to work. You shouldn't need that, but just in case the plugin doesn't work, try to do it. The way to set a custom error page is explained in the Symfony books.

You're done.

Changelog

2009-10-28 | 1.1

Added nice HTML format for the email (thanks to Gustavo Garcia)

Added user information to the email (thanks to Gustavo Garcia)

Added the possibility to also trigger the notification email
explicitly via a standard method call