Download the PHP package hugomyb/filament-error-mailer without Composer
On this page you can find all versions of the php package hugomyb/filament-error-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hugomyb/filament-error-mailer
More information about hugomyb/filament-error-mailer
Files in hugomyb/filament-error-mailer
Package filament-error-mailer
Short Description Filament plugin for instant e-mail alerts on web errors, simplifying monitoring and application stability.
License MIT
Homepage https://github.com/hugomyb/filament-error-mailer
Informations about the package filament-error-mailer
Filament Error Mailer 🚨
A powerful Filament plugin that provides instant error notifications via email and Discord webhooks, with a beautiful error details page for debugging. Never miss a critical error in your application again!
✨ Key Features
- 📧 Instant Email Notifications - Get notified immediately when errors occur
- 💬 Discord Webhook Integration - Send alerts to your Discord channels
- 🔗 Custom Webhook Endpoints - POST raw error JSON to any number of URLs (n8n, Zapier, Slack apps, custom APIs)
- 🎯 Smart Application File Detection - Automatically identifies errors in your code (excluding vendor files)
- 🌓 Beautiful Error Details Page - Dark/Light mode with copy & share functionality
- ⏱️ Cooldown System - Prevents notification spam for duplicate errors
- 🎛️ Advanced Filtering - Filter by log level, exception type, or environment
- 🔒 Secure Access - Protected by Filament authentication
- 📦 JSON Storage - All errors stored as JSON files for easy access
📋 Table of Contents
- Installation
- Configuration
- Email Configuration
- Discord Webhook
- Custom Webhook Endpoints
- Error Filtering
- Cooldown Period
- Storage Path
- Features in Detail
- Smart Application File Detection
- Error Details Page
- Notification Cooldown
- Usage
- Accessing Error Details
- Scheduled Cleanup
- Advanced Configuration
- Contributing
- License
📦 Installation
Step 1: Install via Composer
Step 2: Publish Configuration
Publish the configuration file:
This creates config/error-mailer.php with the following default configuration:
Step 3: Configure Mail Server
⚠️ IMPORTANT: Configure your mail server in
.envto receive email notifications:
Step 4: Register the Plugin
Add the plugin to your Filament panel provider (e.g., app/Providers/Filament/AdminPanelProvider.php):
Step 5: (Optional) Publish Views
If you want to customize the error details page or email template:
⚙️ Configuration
Email Configuration
Configure email recipients and subject in config/error-mailer.php:
Options:
recipient(array): Primary email addresses to receive notificationsbcc(array): Blind carbon copy recipientscc(array): Carbon copy recipientssubject(string): Email subject line (supports dynamic values)
Discord Webhook
Send error notifications to Discord channels:
1. Create a Discord Webhook:
- Go to your Discord server settings
- Navigate to Integrations → Webhooks
- Click "New Webhook"
- Copy the webhook URL
2. Add to .env:
3. Customize webhook messages (optional):
Custom Webhook Endpoints
In addition to the Discord webhook, the plugin can POST the raw error details (as JSON) to any number of custom URLs. This is useful for forwarding errors to n8n, Zapier, Slack apps, a monitoring service, or your own internal API.
1. Via .env (comma-separated list):
2. Or directly in config/error-mailer.php:
Each URL receives a POST request with a JSON body containing the full error details:
Endpoints share the same cooldown as the email/Discord notifications — duplicate errors within cacheCooldown minutes are not re-sent.
Error Filtering
Control which errors trigger notifications:
Available log levels:
debug- Detailed debug informationinfo- Interesting eventsnotice- Normal but significant eventswarning- Exceptional occurrences that are not errorserror- Runtime errorscritical- Critical conditionsalert- Action must be taken immediatelyemergency- System is unusable
Disable in Specific Environments
Prevent notifications in certain environments (e.g., local development):
Cooldown Period
Prevent notification spam for duplicate errors:
If the same error occurs multiple times within this period, only the first occurrence will trigger a notification.
Storage Path
Customize where error JSON files are stored:
🎯 Features in Detail
Smart Application File Detection
When an error occurs, the package intelligently identifies the first line of code from your application (excluding vendor files) in the stack trace.
Example:
Instead of showing:
You'll see:
This makes debugging significantly faster by immediately showing you where in your code the error originated.
Error Details Page
Each error notification includes a unique link to a beautiful, feature-rich error details page:
Features:
- 🌓 Dark/Light Mode - Toggle themes with persistent preference (saved in localStorage)
- 📋 Copy as Markdown - Copy formatted error details for documentation
- 📄 Copy as JSON - Copy raw error data for processing
- 🔗 Share - Use native Web Share API (mobile-friendly)
- 🔒 Secure - Protected by Filament authentication
- 📱 Responsive - Works perfectly on all devices
Information displayed:
- Error message and exception type
- Application file and line (your code)
- Origin file and line (where exception was thrown)
- Full stack trace
- Request details (method, URL, IP, user agent, referrer)
- Authenticated user information (if available)
- Timestamp
Access: Only authenticated Filament users can view error details.
Notification Cooldown
The cooldown system prevents notification spam:
- When an error occurs, a notification is sent
- Error details are stored with a timestamp
- If the same error occurs again within the cooldown period, no new notification is sent
- After the cooldown expires, the next occurrence will trigger a new notification
Error identification: Errors are identified by a hash of the error message and file path.
🚀 Usage
Accessing Error Details
Error detail links are automatically included in:
- Email notifications
- Discord webhook messages
URL format: https://yourapp.com/error-mailer/{errorId}
Example email:
Scheduled Cleanup
Error JSON files are stored indefinitely by default. To prevent excessive storage usage, schedule a cleanup task in app/Console/Kernel.php:
Recommended retention periods:
- Production: 3-6 months
- Staging: 1-3 months
- Development: 1 month
🔧 Advanced Configuration
Complete Configuration Reference
📚 Related Projects
This plugin is also available for Laravel projects without Filament:
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING for details.
Development Setup
Running Tests
🔒 Security Vulnerabilities
If you discover a security vulnerability, please send an email to [email protected]. All security vulnerabilities will be promptly addressed.
Please review our security policy for more information.
👥 Credits
- Hugo Mayonobe - Creator & Maintainer
- All Contributors
📄 License
The MIT License (MIT). Please see License File for more information.
💡 Support
If you find this package helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs or suggesting features via GitHub Issues
- 📖 Improving documentation via pull requests
Made with ❤️ for the Filament community
All versions of filament-error-mailer with dependencies
filament/filament Version ^3.0|^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0