How hexters/maillens works
MailLens is a Laravel development mail catcher: the host app sends mail through its configured lens mailer, which stores messages for browsing at /mail. The inbox supports search, message previews and source, attachment downloads, polling, deletion and read-state management; password protection is optional. Queued mail is captured when Laravel’s queue runs it. The graph follows the sampled provider, transport, model, routes, middleware and controller; the README documents database storage and the migration, whose implementation was not sampled.
Main entry points: web.php Inbox routes · MailLensServiceProvider.php Service provider · MailLensTransport.php Capture transport · MailLensController.php Inbox controller
Components 13
Laravel integration
- Service provider
src/MailLensServiceProvider.php - MailLens config
src/Config/config.php - Inbox routes
src/routes/web.php
Mail capture
- Capture transport
src/Transport/MailLensTransport.php
Inbox and access
- Password guard
src/Http/Middleware/MailLensGuard.php - Lock screen
src/Resources/views/lock.blade.php - Inbox controller
src/Http/Controllers/MailLensController.php - Inbox interface
src/Resources/views/index.blade.php
Message persistence
- Message model
src/Models/MailLensMessage.php - Message table
database/migrations/2026_01_01_000000_create_maillens_messages_table.php
Other components
- Laravel app
- Developer browser
- Laravel queue worker
Connections 15
- Laravel app → Service provider: boots package
- Service provider → MailLens config: merges config
src/MailLensServiceProvider.php - Service provider → Capture transport: registers mailer
src/MailLensServiceProvider.php - Service provider → Inbox routes: loads when active
src/MailLensServiceProvider.php - Laravel app → Capture transport: sends via lens
README.md - Laravel queue worker → Capture transport: runs queued send
README.md - Capture transport → Message model: creates and prunes
src/Transport/MailLensTransport.php - Message model → Message table: stores messages
README.md - Inbox routes → Password guard: guards inbox routes
src/routes/web.php - Password guard → Lock screen: renders lock screen
src/Http/Middleware/MailLensGuard.php - Inbox routes → Inbox controller: dispatches requests
src/routes/web.php - Inbox controller → Message model: queries and updates
src/Http/Controllers/MailLensController.php - Inbox controller → Inbox interface: renders inbox
src/Http/Controllers/MailLensController.php - Developer browser → Inbox routes: opens inbox
README.md - Inbox interface → Inbox routes: polls for changes
src/Resources/views/index.blade.php