- What is pod-point/laravel-mail-export used for?
- It provides a mailable trait and interface that export rendered emails to a storage disk when they are sent. It is useful for inspecting templates, archiving mail output, and debugging mail in development. It fits Laravel's existing mail configuration rather than replacing it.
- How do I install pod-point/laravel-mail-export in a Laravel app?
- Install it with Composer using composer require pod-point/laravel-mail-export. Then add the package trait and interface to the mailables you want to export and configure your storage disk. Check the README and composer.json for exact version constraints before adopting it.
- Which Laravel and PHP versions does laravel-mail-export 2.2.0 support?
- Version 2.2.0 is positioned for Laravel 9, 10, and 11 applications. PHP 8.1 compatibility is preserved for Laravel 9/10, while Laravel 11 requires PHP 8.2 or newer. Always confirm the exact Composer constraints in the package's composer.json.
- How do I enable mail export on a mailable?
- Add the package's mailable trait and implement its interface on the mailable you want to export, then configure the storage disk according to the README. The package is designed to fit existing Laravel mail configuration, so you should not need to replace Laravel's mailer. Test one mailable first to confirm the exported output and destination.
- Does laravel-mail-export work with queued mailables?
- Queued mail is rendered and sent by a queue worker, so any export behavior runs in that worker context. The release notes do not document detailed queue semantics, so test queued mailables in staging and monitor worker failures and storage permissions. Prefer asynchronous handling where your setup supports it.
- Where does laravel-mail-export store exported emails?
- Exported emails are written to a Laravel storage disk, which you configure. That could be local storage or another disk supported by Laravel's filesystem abstraction. Choose a disk with appropriate permissions, retention, and access controls.
- Can I use laravel-mail-export to inspect email templates in development?
- Yes. Capturing rendered mailables to disk is useful for inspecting templates and debugging mail output without relying on an external inbox. You can pair it with Laravel's development mail settings, but confirm whether your configured mailer also sends the message. Review the README for the exact trait and disk configuration.
- Is laravel-mail-export safe to use with production email containing PII?
- Exported mail can contain the same PII, tokens, and attachments as the original message, so treat the export disk as sensitive data. Define retention and cleanup policies, restrict access, and consider encryption at rest. The release notes do not document built-in PII controls, so validate behavior in your environment.
- Are there breaking changes in laravel-mail-export 2.2.0?
- Version 2.2.0 is described as an additive compatibility release with no indicated breaking API changes. It adds Laravel 11 fit and preserves PHP 8.1 compatibility for Laravel 9/10 applications. Still run your mail-related tests and Composer resolution checks before upgrading.
- What should I verify before rolling out laravel-mail-export in production?
- Verify exact Composer constraints for Laravel and PHP, run dependency resolution checks, and test export behavior in staging. Confirm storage permissions, queue interaction, failure handling, export volume, retention, and PII controls. Roll out to a low-risk application first.