jeffersongoncalves/laravel-mail
Complete email management for Laravel: logs outgoing mail, database Blade templates with translations and versioning, webhook delivery tracking (SES/SendGrid/Postmark/Mailgun/Resend), open/click pixel tracking, suppression list, CSS inlining, List-Unsubscribe, preview, stats, retries.
Mail facade, Notification system, and Event system. It integrates seamlessly with Laravel’s existing email infrastructure (e.g., Mailable, Notification channels) without requiring architectural overhauls.MailBounced, MailOpened), enabling custom logic without modifying core package code.spatie/laravel-translatable (for templates) and tijsverkoyen/css-to-inline-styles (for CSS inlining), both well-maintained packages.mail_logs, mail_templates, mail_template_versions, etc.). Ensure your database supports migrations and has sufficient storage for email logs (especially if tracking opens/clicks at scale).List-Unsubscribe header meet regulatory requirements (e.g., CAN-SPAM, GDPR)?Mail, Notification, and Event systems. No conflicts with existing email infrastructure.Phase 1: Logging and Templates (Low Risk)
LARAVEL_MAIL_LOGGING_ENABLED=true) to audit existing emails without disrupting workflows.PreviewTemplateAction to validate rendering before sending.TemplateMailable classes.Phase 2: Tracking (Medium Risk)
MailBounced/MailComplained to auto-suppress addresses and trigger alerts.Phase 3: Advanced Features (High Customization)
List-Unsubscribe headers globally.php artisan mail:prune) for log cleanup.Mailable classes. Only TemplateMailable classes benefit from full template features.spatie/laravel-activitylog, laravel-notification-channels). Test with your stack.| Step | Priority | Effort | Dependencies |
|---|---|---|---|
| Install and configure package | High | Low | Laravel 10+ |
| Enable logging and validate data | High | Medium | Database |
| Migrate critical emails to templates | Medium | High | Template design |
| Set up webhook tracking for primary provider | Medium | High | Provider API access |
| Implement pixel tracking fallback | Low | Medium | URL routing |
| Configure suppression lists and retries | Low | Medium | Business rules |
| Set up pruning and analytics | Low | Medium | Monitoring tools |
php artisan mail:prune) to manage log growth. Configure retention policies per status (e.g., keep bounces for 1 year, opens for 6 months).LARAVEL_MAIL_SENDGRID_SIGNING_SECRET) in a secrets manager (e.g., Laravel Forge, Vault).PreviewTemplateAction to validate before deployment.mail:stats to query sent/delivered emails. Check mail_logs table for failed sends.mail_suppressions table for false positives (e.g., typo’d emails).PreviewTemplateAction to debug rendering.X-SMTPAPI) for advanced features.How can I help you explore Laravel packages today?