Use plain HTML for test email to avoid mail namespace issue

This commit is contained in:
Naser Mansour 2026-01-28 16:50:58 +02:00
parent 4283944f33
commit 4fef8dc165
1 changed files with 26 additions and 27 deletions

View File

@ -1,33 +1,32 @@
@component('mail::message') <!DOCTYPE html>
@if($locale === 'ar') <html lang="{{ $locale }}" dir="{{ $locale === 'ar' ? 'rtl' : 'ltr' }}">
<div dir="rtl" style="text-align: right;"> <head>
# {{ __('emails.test_email_title', [], $locale) }} <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ __('emails.test_email_body', [], $locale) }} <title>{{ __('emails.test_email_subject', [], $locale) }}</title>
</head>
{{ __('emails.test_email_timestamp', ['time' => now()->format('Y-m-d H:i:s')], $locale) }} <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px; {{ $locale === 'ar' ? 'text-align: right;' : '' }}">
<div style="background: #2D3624; padding: 20px; text-align: center; margin-bottom: 20px;">
{{ __('emails.test_email_config_info', [], $locale) }} <h1 style="color: #A68966; margin: 0;">{{ config('app.name') }}</h1>
- **{{ __('emails.sender_name', [], $locale) }}** {{ config('mail.from.name') }}
- **{{ __('emails.sender_email', [], $locale) }}** {{ config('mail.from.address') }}
{{ __('emails.regards', [], $locale) }}<br>
{{ config('app.name') }}
</div> </div>
@else
# {{ __('emails.test_email_title', [], $locale) }}
{{ __('emails.test_email_body', [], $locale) }} <div style="background: #F4F1EA; padding: 20px; border-radius: 5px;">
<h2 style="color: #2D322A;">{{ __('emails.test_email_title', [], $locale) }}</h2>
{{ __('emails.test_email_timestamp', ['time' => now()->format('Y-m-d H:i:s')], $locale) }} <p>{{ __('emails.test_email_body', [], $locale) }}</p>
{{ __('emails.test_email_config_info', [], $locale) }} <p>{{ __('emails.test_email_timestamp', ['time' => now()->format('Y-m-d H:i:s')], $locale) }}</p>
- **{{ __('emails.sender_name', [], $locale) }}** {{ config('mail.from.name') }} <p>{{ __('emails.test_email_config_info', [], $locale) }}</p>
- **{{ __('emails.sender_email', [], $locale) }}** {{ config('mail.from.address') }}
{{ __('emails.regards', [], $locale) }}<br> <ul style="list-style: none; padding: 0;">
{{ config('app.name') }} <li><strong>{{ __('emails.sender_name', [], $locale) }}</strong> {{ config('mail.from.name') }}</li>
@endif <li><strong>{{ __('emails.sender_email', [], $locale) }}</strong> {{ config('mail.from.address') }}</li>
@endcomponent </ul>
</div>
<div style="margin-top: 20px; padding-top: 20px; border-top: 1px solid #ddd; text-align: center; color: #666; font-size: 12px;">
<p>{{ __('emails.regards', [], $locale) }}<br>{{ config('app.name') }}</p>
</div>
</body>
</html>