vormkracht10/filament-mails
Composer 安装命令:
composer require vormkracht10/filament-mails
包简介
View logged mails and events in a beautiful Filament UI.
关键字:
README 文档
README
Backstage Mails
Nice to meet you, we're Backstage
Hi! 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.
About the package
Mails 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:
- Log all sent emails with only specific attributes
- View all sent emails in the browser using the viewer
- Collect feedback about the delivery from email providers using webhooks
- Get automatically notified when email bounces
- Prune logging of emails periodically
- Resend logged email to same or another recipient
Upcoming features
- We're currently in the process of writing mail events support for other popular email service providers like Resend, SendGrid, Amazon SES and Mailtrap.
- Relate emails being send in Laravel directly to Eloquent models, for example the order confirmation email attached to an Order model.
Why this package
Email 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.
The package is built on top of Laravel Mails.
Installation
You can install the package via composer:
composer require backstage/mails
You can publish and run the migrations with:
php artisan vendor:publish --tag="mails-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="mails-config"
Optionally, you can publish the views using
php artisan vendor:publish --tag="mails-views"
Add the plugin to your PanelProvider
use Backstage\Mails\MailsPlugin; public function panel(Panel $panel): Panel { return $panel ->plugin(MailsPlugin::make()); }
Security
Using 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:
use Backstage\Mails\MailsPlugin; use Illuminate\Support\Facades\Auth; $panel ->plugins([ MailsPlugin::make() ->canManageMails(function () { $user = Auth::user(); // Allow access for users with specific roles if ($user->hasRole('admin') || $user->hasRole('supervisor')) { return true; } // Allow access for users with specific permissions if ($user->hasPermissionTo('manage mails')) { return true; } // Restrict access for all other users return false; }), ]);
This 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.
Important
For setting up the webhooks to register mail events, please look into the README of Laravel Mails, the underlying package that powers this package.
Configuration
Sometimes 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.
return [ 'resources' => [ 'mail' => \App\Filament\Resources\MailResource::class, 'event' => \App\Filament\Resources\EventResource::class, 'suppression' => \App\Filament\Resources\SuppressionResource::class ], ];
Features and screenshots
List with all sent emails and statistics
The package provides a clear overview of all emails, including statistics and the ability to filter the data.

Resending emails
You can resend emails to the same or another recipient(s). This is useful when your email has bounced and you want to resend it.

Information
You 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.

Preview email
The package provides a preview of the email. This is useful to quickly check if the email is correct.

We also provide the raw HTML and plain text of the email.

Events
The package also logs all events that are fired when an email is sent. This is useful to track the email sending process.

Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
vormkracht10/filament-mails 适用场景与选型建议
vormkracht10/filament-mails 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 57.9k 次下载、GitHub Stars 达 163, 最近一次更新时间为 2024 年 09 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「mails」 「laravel」 「backstagephp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 vormkracht10/filament-mails 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vormkracht10/filament-mails 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 vormkracht10/filament-mails 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.
Mails Plugin for NetCommons
Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.
View logged mails and events in a beautiful Filament UI.
View logged mails and events in a beautiful Filament UI.
The Laravel tool to boost the SEO score of your web pages.
统计信息
- 总下载量: 57.9k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 163
- 点击次数: 30
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-07
