{"id":47682534,"url":"https://github.com/backstagephp/mails","last_synced_at":"2026-04-02T14:05:49.753Z","repository":{"id":255652345,"uuid":"849723380","full_name":"backstagephp/mails","owner":"backstagephp","description":"Collect everything about sent mails in your Filament app.","archived":false,"fork":false,"pushed_at":"2026-03-25T10:31:08.000Z","size":6607,"stargazers_count":159,"open_issues_count":0,"forks_count":26,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-26T12:45:25.496Z","etag":null,"topics":["email","laravel","laravel-framework","laravel-package","mail","mailgun","postmark"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backstagephp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"vormkracht10"}},"created_at":"2024-08-30T05:57:31.000Z","updated_at":"2026-03-25T10:31:13.000Z","dependencies_parsed_at":"2024-12-23T22:24:04.483Z","dependency_job_id":"a8fdab8c-db21-47cb-a2c6-05423448f841","html_url":"https://github.com/backstagephp/mails","commit_stats":null,"previous_names":["vormkracht10/filament-mails","backstagephp/mails"],"tags_count":153,"template":false,"template_full_name":"filamentphp/plugin-skeleton","purl":"pkg:github/backstagephp/mails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstagephp%2Fmails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstagephp%2Fmails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstagephp%2Fmails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstagephp%2Fmails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backstagephp","download_url":"https://codeload.github.com/backstagephp/mails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backstagephp%2Fmails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","laravel","laravel-framework","laravel-package","mail","mailgun","postmark"],"created_at":"2026-04-02T14:05:47.509Z","updated_at":"2026-04-02T14:05:49.747Z","avatar_url":"https://github.com/backstagephp.png","language":"PHP","funding_links":["https://github.com/sponsors/vormkracht10"],"categories":[],"sub_categories":[],"readme":"# View all sent emails and events from your Laravel app with Filament\n\n## Backstage Mails\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/backstage/mails.svg?style=flat-square)](https://packagist.org/packages/backstage/mails)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/backstagephp/mails/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/backstagephp/mails/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/backstagephp/mails/fix-php-code-styling.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/backstagephp/mails/actions?query=workflow%3A\"Fix+PHP+code+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/backstage/mails.svg?style=flat-square)](https://packagist.org/packages/backstage/mails)\n\n## Nice to meet you, we're [Backstage](https://backstagephp.com)\n\nHi! We are a web development agency from Nijmegen in the Netherlands and we use Laravel for everything: advanced websites with a lot of bells and whistles and large web applications.\n\n## About the package\n\nMails can collect everything you might want to track about the mails that has been sent by your Filament app. Common use cases are provided in this package:\n\n-   Log all sent emails with only specific attributes\n-   View all sent emails in the browser using the viewer\n-   Collect feedback about the delivery from email providers using webhooks\n-   Get automatically notified when email bounces\n-   Prune logging of emails periodically\n-   Resend logged email to same or another recipient\n\n## Upcoming features\n\n-   We're currently in the process of writing mail events support for other popular email service providers like Resend, SendGrid, Amazon SES and Mailtrap.\n-   Relate emails being send in Laravel directly to Eloquent models, for example the order confirmation email attached to an Order model.\n\n## Why this package\n\nEmail as a protocol is very error prone. Succesfull email delivery is not guaranteed in any way, so it is best to monitor your email sending realtime. Using external services like Postmark, Mailgun or Resend email gets better by offering things like logging and delivery feedback, but it still needs your attention and can fail silently but horendously. Therefore we created Laravel Mails that fills in all the gaps.\n\nThe package is built on top of [Laravel Mails](https://github.com/backstagephp/laravel-mails).\n\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails.jpeg)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require backstage/mails\n```\n\nYou can publish and run the migrations with:\n\n```bash\nphp artisan vendor:publish --tag=\"mails-migrations\"\nphp artisan migrate\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"mails-config\"\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"mails-views\"\n```\n\nAdd the plugin to your `PanelProvider`\n\n```php\nuse Backstage\\Mails\\MailsPlugin;\n\npublic function panel(Panel $panel): Panel\n{\n    return $panel\n        -\u003eplugin(MailsPlugin::make());\n}\n```\n\n### Security\n\nUsing the `canManageMails()` method, you can define which users have access to the mail resources/pages. Here's a comprehensive example that includes additional logic for flexibility:\n\n```php\nuse Backstage\\Mails\\MailsPlugin;\nuse Illuminate\\Support\\Facades\\Auth;\n\n$panel\n    -\u003eplugins([\n        MailsPlugin::make()\n            -\u003ecanManageMails(function () {\n                $user = Auth::user();\n\n                // Allow access for users with specific roles\n                if ($user-\u003ehasRole('admin') || $user-\u003ehasRole('supervisor')) {\n                    return true;\n                }\n\n                // Allow access for users with specific permissions\n                if ($user-\u003ehasPermissionTo('manage mails')) {\n                    return true;\n                }\n\n                // Restrict access for all other users\n                return false;\n            }),\n    ]);\n```\n\nThis example demonstrates how to combine role-based and permission-based access control, providing a more robust and flexible approach to managing access to mail resources.\n\n\u003e [!IMPORTANT]\n\u003e For setting up the webhooks to register mail events, please look into the README of [Laravel Mails](https://github.com/backstagephp/laravel-mails), the underlying package that powers this package.\n\n### Configuration\n\nSometimes you want to customize the resource, like configuring which users or roles may access the resource. You can do this by overriding the `MailResource` or `EventResource` classes in the `mails` config file. Make sure your custom resource extends the original resource.\n\n```php\nreturn [\n    'resources' =\u003e [\n        'mail' =\u003e \\App\\Filament\\Resources\\MailResource::class,\n        'event' =\u003e \\App\\Filament\\Resources\\EventResource::class,\n        'suppression' =\u003e \\App\\Filament\\Resources\\SuppressionResource::class\n    ],\n];\n```\n\n## Features and screenshots\n\n### List with all sent emails and statistics\n\nThe package provides a clear overview of all emails, including statistics and the ability to filter the data.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mails-list.png)\n\n### Resending emails\n\nYou can resend emails to the same or another recipient(s). This is useful when your email has bounced and you want to resend it.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-resend.png)\n\n### Information\n\nYou can view all relevant information about the email, such as the subject, the body, the attachments, the from address, the to address(es), the cc address(es), the bcc address(es), the reply to address, metadata and much more.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-sender-information.png)\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-statistics.png)\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-events.png)\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-attachments.png)\n\n### Preview email\n\nThe package provides a preview of the email. This is useful to quickly check if the email is correct.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-preview.png)\n\nWe also provide the raw HTML and plain text of the email.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/mail-raw-html.png)\n\n### Events\n\nThe package also logs all events that are fired when an email is sent. This is useful to track the email sending process.\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/events-list.png)\n![Mails](https://raw.githubusercontent.com/backstagephp/mails/main/docs/event-details.png)\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n-   [Baspa](https://github.com/backstagephp)\n-   [Mark van Eijk](https://github.com/markvaneijk)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackstagephp%2Fmails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackstagephp%2Fmails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackstagephp%2Fmails/lists"}