- What is kirschbaum-development/mail-intercept used for?
- It intercepts outgoing email from Laravel applications so messages are not delivered to real recipients, making it useful for staging and local development QA. The package is designed as a test utility and is added via Composer without introducing a separate service or vendor account. Confirm whether your installed version only redirects mail or also persists messages for review.
- How do I install mail-intercept in a Laravel app?
- Install with composer require kirschbaum-development/mail-intercept, then publish the package config if your version provides it and set the interception environment flag. Laravel service provider auto-discovery should register the package, so no manual wiring is usually needed. Run a test send in a non-production environment to verify the interception path before relying on it.
- Which Laravel and PHP versions does mail-intercept support?
- Release 1.1.0 is described as a Laravel 13 compatibility commit, so it is intended to work with current Laravel versions. Because the bump may have raised the PHP or framework floor, check the composer.json constraints in the vendor tree for the exact Laravel and PHP versions your app needs. Diff the release rather than relying only on the changelog.
- Does mail-intercept store emails in the database or only redirect them?
- The package overview describes redirecting outgoing mail to a configurable address, while supporting material references persisted capture, a browsable review UI, and resend. Those are materially different behaviours with different privacy and retention implications. Inspect the actual vendor tree and published migrations before you assume database capture is available.
- Is mail-intercept safe to use in production?
- It is intended for staging and local development, not as a production mail delivery layer. The main risk is silent pass-through: if interception is not active in a queue worker or a mail path bypasses Laravel's mailer, real email can reach real customers. Use it with a clear environment flag, a named owner, and monitoring or smoke tests that prove interception is working.
- Which mail paths does mail-intercept cover, such as queued mail and notifications?
- It fits applications that send through Laravel's native Mail, Mailable, and Notification surfaces. It will not see messages sent through vendor SDKs such as Postmark, Mailgun HTTP, or SES SDK, or hand-rolled SMTP in jobs. Verify queued mail through a real worker, Mail::raw, CC/BCC, and multi-mailer setups in your own app before relying on it.
- How does mail-intercept compare with Mail::fake() in Laravel tests?
- Mail::fake() is for automated tests where you assert that mail was sent without needing to read the rendered message. Mail-intercept is aimed at manual QA and non-engineer content review, where you want to inspect actual outgoing email without delivering it. The two can coexist because they solve different testing problems.
- What alternatives exist if mail-intercept is unmaintained?
- You can fork and pin the package, replace it with a Dockerized SMTP sink such as Mailpit or MailHog, or use Laravel's mail fake for automated tests. Mailpit and MailHog are common fallbacks because they capture mail outside the application and do not depend on a single-organisation maintainer. Choose based on whether you need persisted review, a UI, or just a safe local inbox.
- Is mail-intercept fail-safe when the environment variable is missing?
- The assessment flags this as a key question: confirm whether interception defaults to on or off when the environment variable is absent. A fail-safe default intercepts mail; a fail-open default sends real email. Test the absent-variable case explicitly in staging and queue workers before trusting the package as a safety control.
- Does mail-intercept work with Laravel 13 and is version 1.1.0 a safe upgrade?
- Version 1.1.0 is described as a laravel-shift Laravel 13 compatibility commit with no stated API or behavioural change. That suggests a low-risk constraint bump, but you should still diff the vendor tree to confirm config keys and published migrations did not change. Also check whether the Laravel 13 support tracks a GA timeline or is aspirational.