Skip to content

Commit fda2812

Browse files
MarkMark
authored andcommitted
2 parents a29fb46 + 77b3964 commit fda2812

29 files changed

Lines changed: 395 additions & 230 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/vormkracht10/filament-mails/discussions/new?category=q-a
4+
url: https://github.com/backstagephp/filament-mails/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/vormkracht10/filament-mails/discussions/new?category=ideas
7+
url: https://github.com/backstagephp/filament-mails/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a security issue
10-
url: https://github.com/vormkracht10/filament-mails/security/policy
10+
url: https://github.com/backstagephp/filament-mails/security/policy
1111
about: Learn how to notify us for sensitive bugs

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
with:
1919
ref: ${{ github.head_ref }}
2020

2121
- name: Fix PHP code style issues
22-
uses: aglipanci/laravel-pint-action@2.5
22+
uses: aglipanci/laravel-pint-action@2.6
2323

2424
- name: Commit changes
25-
uses: stefanzweifel/git-auto-commit-action@v5
25+
uses: stefanzweifel/git-auto-commit-action@v6
2626
with:
2727
commit_message: Fix styling

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: phpstan
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2

.github/workflows/run-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest, windows-latest]
16-
php: [8.2, 8.1]
17-
laravel: [10.*]
16+
php: [8.2]
17+
laravel: [11.*]
1818
stability: [prefer-lowest, prefer-stable]
1919
include:
20-
- laravel: 10.*
21-
testbench: 8.*
22-
carbon: 2.*
20+
- laravel: 11.*
21+
testbench: 9.*
22+
carbon: 3.*
2323

2424
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929

3030
- name: Setup PHP
3131
uses: shivammathur/setup-php@v2

.github/workflows/update-changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
with:
1818
ref: main
1919

@@ -24,7 +24,7 @@ jobs:
2424
release-notes: ${{ github.event.release.body }}
2525

2626
- name: Commit updated CHANGELOG
27-
uses: stefanzweifel/git-auto-commit-action@v5
27+
uses: stefanzweifel/git-auto-commit-action@v6
2828
with:
2929
branch: main
3030
commit_message: Update CHANGELOG

CHANGELOG.md

Lines changed: 56 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,77 @@
22

33
All notable changes to `filament-mails` will be documented in this file.
44

5+
## Added navigation sort config option - 2025-10-01
6+
7+
### What's Changed
8+
9+
* feat: add navigation sort configuration to MailResource by @somegooser in https://github.com/backstagephp/filament-mails/pull/60
10+
11+
### New Contributors
12+
13+
* @somegooser made their first contribution in https://github.com/backstagephp/filament-mails/pull/60
14+
15+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v3.0.4...v3.0.5
16+
17+
## v3.0.0 - 2025-06-24
18+
19+
### Breaking changes
20+
21+
- Updated to Filament v4
22+
- Changed namespace to Backstage
23+
24+
### What's Changed
25+
26+
* fix bulk resend by @cntabana in https://github.com/backstagephp/filament-mails/pull/33
27+
* fix single resend action by @cntabana in https://github.com/backstagephp/filament-mails/pull/34
28+
* Fix issue with navigation icons by @Skullbock in https://github.com/backstagephp/filament-mails/pull/37
29+
* Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 by @dependabot in https://github.com/backstagephp/filament-mails/pull/41
30+
* [Fix] Hardcoded MailAttachment model should be replaced by config by @Baspa in https://github.com/backstagephp/filament-mails/pull/44
31+
* Update SuppressionResource.php by @bariskanberkay in https://github.com/backstagephp/filament-mails/pull/46
32+
33+
### New Contributors
34+
35+
* @cntabana made their first contribution in https://github.com/backstagephp/filament-mails/pull/33
36+
* @bariskanberkay made their first contribution in https://github.com/backstagephp/filament-mails/pull/46
37+
38+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v2.3.0...v3.0.0
39+
540
## v2.3.5 - 2025-04-08
641

742
### What's Changed
843

9-
* Fix issue with navigation icons by @Skullbock in https://github.com/vormkracht10/filament-mails/pull/37
44+
* Fix issue with navigation icons by @Skullbock in https://github.com/backstagephp/filament-mails/pull/37
1045

11-
**Full Changelog**: https://github.com/vormkracht10/filament-mails/compare/v2.3.4...v2.3.5
46+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v2.3.4...v2.3.5
1247

1348
## New feature: Suppressions list with option to unsuppress email addresses - 2025-01-23
1449

1550
### What's Changed
1651

17-
* Suppressions list by @markvaneijk in https://github.com/vormkracht10/filament-mails/pull/11
52+
* Suppressions list by @markvaneijk in https://github.com/backstagephp/filament-mails/pull/11
1853

1954
### New Contributors
2055

21-
* @markvaneijk made their first contribution in https://github.com/vormkracht10/filament-mails/pull/11
56+
* @markvaneijk made their first contribution in https://github.com/backstagephp/filament-mails/pull/11
2257

23-
**Full Changelog**: https://github.com/vormkracht10/filament-mails/compare/v2.1.0...v2.2.0
58+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v2.1.0...v2.2.0
2459

2560
## v2.1.0 - 2025-01-22
2661

2762
### What's Changed
2863

29-
* [Fix] Format text to prevent stripping line breaks by @Baspa in https://github.com/vormkracht10/filament-mails/pull/14
30-
* [Fix] Define nullable parameter as nullable by @Baspa in https://github.com/vormkracht10/filament-mails/pull/15
31-
* fix: Dynamically determine if tenant is set by @Baspa in https://github.com/vormkracht10/filament-mails/pull/16
32-
* [Fix] Return empty array when $record's to, cc or bcc is empty (#18) by @vincentvankekerix in https://github.com/vormkracht10/filament-mails/pull/19
33-
* Update Pages to reflect configured resource class name by @Skullbock in https://github.com/vormkracht10/filament-mails/pull/20
64+
* [Fix] Format text to prevent stripping line breaks by @Baspa in https://github.com/backstagephp/filament-mails/pull/14
65+
* [Fix] Define nullable parameter as nullable by @Baspa in https://github.com/backstagephp/filament-mails/pull/15
66+
* fix: Dynamically determine if tenant is set by @Baspa in https://github.com/backstagephp/filament-mails/pull/16
67+
* [Fix] Return empty array when $record's to, cc or bcc is empty (#18) by @vincentvankekerix in https://github.com/backstagephp/filament-mails/pull/19
68+
* Update Pages to reflect configured resource class name by @Skullbock in https://github.com/backstagephp/filament-mails/pull/20
3469

3570
### New Contributors
3671

37-
* @vincentvankekerix made their first contribution in https://github.com/vormkracht10/filament-mails/pull/19
38-
* @Skullbock made their first contribution in https://github.com/vormkracht10/filament-mails/pull/20
72+
* @vincentvankekerix made their first contribution in https://github.com/backstagephp/filament-mails/pull/19
73+
* @Skullbock made their first contribution in https://github.com/backstagephp/filament-mails/pull/20
3974

40-
**Full Changelog**: https://github.com/vormkracht10/filament-mails/compare/v2.0.0...v2.1.0
75+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v2.0.0...v2.1.0
4176

4277
## v2.0.0 - 2025-01-03
4378

@@ -47,18 +82,18 @@ All notable changes to `filament-mails` will be documented in this file.
4782

4883
### What's Changed
4984

50-
* Install latest version instead of dev-main by @Baspa in https://github.com/vormkracht10/filament-mails/pull/5
51-
* Use Model from Config for Resource by @iAmKevinMcKee in https://github.com/vormkracht10/filament-mails/pull/7
52-
* [Fix] PHPStan issues by @Baspa in https://github.com/vormkracht10/filament-mails/pull/6
53-
* [Fix] Let user specify (tenant aware) routes by @Baspa in https://github.com/vormkracht10/filament-mails/pull/9
54-
* [Fix] Logging and downloading attachments by @Baspa in https://github.com/vormkracht10/filament-mails/pull/9
85+
* Install latest version instead of dev-main by @Baspa in https://github.com/backstagephp/filament-mails/pull/5
86+
* Use Model from Config for Resource by @iAmKevinMcKee in https://github.com/backstagephp/filament-mails/pull/7
87+
* [Fix] PHPStan issues by @Baspa in https://github.com/backstagephp/filament-mails/pull/6
88+
* [Fix] Let user specify (tenant aware) routes by @Baspa in https://github.com/backstagephp/filament-mails/pull/9
89+
* [Fix] Logging and downloading attachments by @Baspa in https://github.com/backstagephp/filament-mails/pull/9
5590

5691
### New Contributors
5792

58-
* @Baspa made their first contribution in https://github.com/vormkracht10/filament-mails/pull/5
59-
* @iAmKevinMcKee made their first contribution in https://github.com/vormkracht10/filament-mails/pull/7
93+
* @Baspa made their first contribution in https://github.com/backstagephp/filament-mails/pull/5
94+
* @iAmKevinMcKee made their first contribution in https://github.com/backstagephp/filament-mails/pull/7
6095

61-
**Full Changelog**: https://github.com/vormkracht10/filament-mails/compare/v1.0.1...v2.0.0
96+
**Full Changelog**: https://github.com/backstagephp/filament-mails/compare/v1.0.1...v2.0.0
6297

6398
## Bugfix - 2024-11-28
6499

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) vormkracht10 <hello@baspa.dev>
3+
Copyright (c) backstagephp <hello@baspa.dev>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Filament Mails
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/vormkracht10/filament-mails.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/filament-mails)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/vormkracht10/filament-mails/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/vormkracht10/filament-mails/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/vormkracht10/filament-mails/fix-php-code-styling.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/vormkracht10/filament-mails/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/vormkracht10/filament-mails.svg?style=flat-square)](https://packagist.org/packages/vormkracht10/filament-mails)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/backstagephp/filament-mails.svg?style=flat-square)](https://packagist.org/packages/backstagephp/filament-mails)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/backstagephp/filament-mails/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/backstagephp/filament-mails/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/backstagephp/filament-mails/fix-php-code-styling.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/backstagephp/filament-mails/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/backstagephp/filament-mails.svg?style=flat-square)](https://packagist.org/packages/backstagephp/filament-mails)
77

8-
## Nice to meet you, we're [Vormkracht10](https://vormkracht10.nl)
8+
## Nice to meet you, we're [Backstage](https://backstagephp.com)
99

1010
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.
1111

@@ -29,16 +29,16 @@ Filament Mails can collect everything you might want to track about the mails th
2929

3030
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.
3131

32-
The package is built on top of [Laravel Mails](https://github.com/vormkracht10/laravel-mails).
32+
The package is built on top of [Laravel Mails](https://github.com/backstagephp/laravel-mails).
3333

34-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/filament-mails.jpeg)
34+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/filament-mails.jpeg)
3535

3636
## Installation
3737

3838
You can install the package via composer:
3939

4040
```bash
41-
composer require vormkracht10/filament-mails
41+
composer require backstage/filament-mails
4242
```
4343

4444
You can publish and run the migrations with:
@@ -64,7 +64,7 @@ php artisan vendor:publish --tag="filament-mails-views"
6464
Add the routes to the PanelProvider using the `routes()` method, like this:
6565

6666
```php
67-
use Vormkracht10\FilamentMails\Facades\FilamentMails;
67+
use Backstage\FilamentMails\Facades\FilamentMails;
6868

6969
public function panel(Panel $panel): Panel
7070
{
@@ -76,7 +76,7 @@ public function panel(Panel $panel): Panel
7676
Then add the plugin to your `PanelProvider`
7777

7878
```php
79-
use Vormkracht10\FilamentMails\FilamentMailsPlugin;
79+
use Backstage\FilamentMails\FilamentMailsPlugin;
8080

8181
public function panel(Panel $panel): Panel
8282
{
@@ -85,13 +85,45 @@ public function panel(Panel $panel): Panel
8585
}
8686
```
8787

88+
### Security
89+
90+
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:
91+
92+
```php
93+
use Backstage\FilamentMails\FilamentMailsPlugin;
94+
use Illuminate\Support\Facades\Auth;
95+
96+
$panel
97+
->plugins([
98+
FilamentMailsPlugin::make()
99+
->canManageMails(function () {
100+
$user = Auth::user();
101+
102+
// Allow access for users with specific roles
103+
if ($user->hasRole('admin') || $user->hasRole('supervisor')) {
104+
return true;
105+
}
106+
107+
// Allow access for users with specific permissions
108+
if ($user->hasPermissionTo('manage mails')) {
109+
return true;
110+
}
111+
112+
// Restrict access for all other users
113+
return false;
114+
}),
115+
]);
116+
```
117+
118+
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.
119+
88120
### Tenant middleware and route protection
89121

90122
If you want to protect the mail routes with your (tenant) middleware, you can do so by adding the routes to the `tenantRoutes`:
91123

92124
```php
93-
use Vormkracht10\FilamentMails\FilamentMailsPlugin;
94-
use Vormkracht10\FilamentMails\Facades\FilamentMails;
125+
use Backstage\FilamentMails\FilamentMailsPlugin;
126+
use Backstage\FilamentMails\Facades\FilamentMails;
95127

96128
public function panel(Panel $panel): Panel
97129
{
@@ -102,7 +134,7 @@ public function panel(Panel $panel): Panel
102134
```
103135

104136
> [!IMPORTANT]
105-
> For setting up the webhooks to register mail events, please look into the README of [Laravel Mails](https://github.com/vormkracht10/laravel-mails), the underlying package that powers this package.
137+
> 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.
106138
107139
### Configuration
108140

@@ -123,34 +155,34 @@ return [
123155
### List with all sent emails and statistics
124156

125157
The package provides a clear overview of all emails, including statistics and the ability to filter the data.
126-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mails-list.png)
158+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mails-list.png)
127159

128160
### Resending emails
129161

130162
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.
131-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-resend.png)
163+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-resend.png)
132164

133165
### Information
134166

135167
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.
136-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-sender-information.png)
137-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-statistics.png)
138-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-events.png)
139-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-attachments.png)
168+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-sender-information.png)
169+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-statistics.png)
170+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-events.png)
171+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-attachments.png)
140172

141173
### Preview email
142174

143175
The package provides a preview of the email. This is useful to quickly check if the email is correct.
144-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-preview.png)
176+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-preview.png)
145177

146178
We also provide the raw HTML and plain text of the email.
147-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/mail-raw-html.png)
179+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/mail-raw-html.png)
148180

149181
### Events
150182

151183
The package also logs all events that are fired when an email is sent. This is useful to track the email sending process.
152-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/events-list.png)
153-
![Filament Mails](https://raw.githubusercontent.com/vormkracht10/filament-mails/main/docs/event-details.png)
184+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/events-list.png)
185+
![Filament Mails](https://raw.githubusercontent.com/backstagephp/filament-mails/main/docs/event-details.png)
154186

155187
## Testing
156188

@@ -172,7 +204,7 @@ Please review [our security policy](../../security/policy) on how to report secu
172204

173205
## Credits
174206

175-
- [Baspa](https://github.com/vormkracht10)
207+
- [Baspa](https://github.com/backstagephp)
176208
- [Mark van Eijk](https://github.com/markvaneijk)
177209
- [All Contributors](../../contributors)
178210

0 commit comments

Comments
 (0)