Send Markdown mail in the Material theme

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V9NnLxnPp8vaaurb3Z1MFy
This commit is contained in:
Andreas Reinhold / reini
2026-09-13 11:02:03 +02:00
co-authored by Claude Opus 5
parent bc69066ead
commit eb33bf77cc
2 changed files with 33 additions and 0 deletions
+22
View File
@@ -115,4 +115,26 @@ return [
'name' => env('MAIL_FROM_NAME', 'Example'), 'name' => env('MAIL_FROM_NAME', 'Example'),
], ],
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| Markdown mail wears Livewire Material's theme, coloured from the light
| scheme in resources/css/material-scheme.json.
|
*/
'markdown' => [
'theme' => env('MAIL_MARKDOWN_THEME', 'livewire-material::mail.theme'),
'paths' => [
resource_path('views/vendor/mail'),
],
'extensions' => [
// \League\CommonMark\Extension\Strikethrough\StrikethroughExtension::class,
],
],
]; ];
+11
View File
@@ -58,3 +58,14 @@ test('password can be reset with valid token', function () {
return true; return true;
}); });
}); });
test('reset password mail wears the material theme in the app scheme', function () {
$user = User::factory()->create();
$scheme = json_decode(file_get_contents(resource_path('css/material-scheme.json')), true);
$html = (string) (new ResetPassword('token'))->toMail($user)->render();
expect($html)
->toContain('background-color: '.$scheme['light']['primary'])
->toContain(route('password.reset', ['token' => 'token', 'email' => $user->email]));
});