- What is masterro/laravel-mail-viewer used for?
- It is a Laravel package that logs outgoing emails, stores them in the database, and displays them in a built-in browser dashboard. You can inspect recipients, subjects, HTML and text bodies, and attachments without digging through logs or an inbox. It is best suited to debugging transactional mail in development and staging, not production audit or compliance.
- How do I install laravel-mail-viewer in a Laravel app?
- Install it with Composer, then publish any required config, assets, and migrations and register the service provider if it is not auto-discovered. Configure storage, run migrations, and protect the viewer route with authentication and authorization middleware. Verify the package's Laravel and PHP constraints before installing.
- Which Laravel and PHP versions are supported?
- The provided context does not list exact Laravel or PHP version constraints, so check the package composer.json and Packagist metadata before installing. Pin the package version and test it against your current Laravel release. Treat any future-dated release metadata cautiously until the repository confirms it.
- Does it capture queued Mailables and notifications?
- It is designed to capture outgoing Laravel mail, but the context does not explicitly confirm support for queued Mailables or notifications. Test representative Mailables, notifications, raw mail, and Markdown mail in a local sandbox before relying on the viewer. Confirm what your installed version actually stores.
- Where does it store captured emails and how do I clean them up?
- The overview says captured emails are stored in the database and displayed in the dashboard. Retention and cleanup mechanisms are not specified in the context, so review the schema and plan a pruning policy before using it in shared environments. Monitor storage growth and avoid treating it as a historical email archive.
- Is the mail viewer dashboard safe to enable in production?
- Do not assume the viewer route is protected by default. Put it behind authentication, authorization, SSO, or an allowlist, and keep production disabled unless you have a reviewed use case. Captured email content can contain PII, so route exposure and data retention need a security review.
- Can laravel-mail-viewer capture attachments and rendered HTML bodies?
- The package overview says you can inspect recipients, subjects, HTML and text bodies, and attachments. Confirm in your installed version that rendered HTML and attachment storage behave as expected for your mail types. Test with representative Mailables before promoting it to staging.
- Will it interrupt or fail email sending if capture breaks?
- The context flags mail-path side effects as a risk if capture is synchronous or throws exceptions, and it does not confirm fail-open behavior. Test capture failures in a sandbox before enabling it anywhere important. Because this is a non-critical observability tool, it should not be allowed to block application mail.
- Does it work with Laravel Octane, Horizon, and multiple app servers?
- Compatibility with Octane, Horizon, queue workers, and multi-node deployments is a listed technical risk rather than a confirmed guarantee. For multi-node staging, verify that all nodes use shared database or storage persistence and test through your queue setup. Pin the version and validate before relying on it.
- How does it compare with Mailpit, Mailtrap, and Telescope, and is it production-proven?
- It is a narrower in-app email viewer that sits beside Mailpit, Mailtrap, and Laravel Telescope rather than replacing them. Adoption is low, with 64 stars and 0 dependents in the provided assessment, so treat it as a cheap-to-trial productivity tool with an exit path. Run a short spike, compare alternatives, and assign an internal owner before keeping it.