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')
@if($locale === 'ar')
<div dir="rtl" style="text-align: right;">
# {{ __('emails.test_email_title', [], $locale) }}
{{ __('emails.test_email_body', [], $locale) }}
{{ __('emails.test_email_timestamp', ['time' => now()->format('Y-m-d H:i:s')], $locale) }}
{{ __('emails.test_email_config_info', [], $locale) }}
- **{{ __('emails.sender_name', [], $locale) }}** {{ config('mail.from.name') }}
- **{{ __('emails.sender_email', [], $locale) }}** {{ config('mail.from.address') }}
{{ __('emails.regards', [], $locale) }}<br>
{{ config('app.name') }}
<!DOCTYPE html>
<html lang="{{ $locale }}" dir="{{ $locale === 'ar' ? 'rtl' : 'ltr' }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ __('emails.test_email_subject', [], $locale) }}</title>
</head>
<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;">
<h1 style="color: #A68966; margin: 0;">{{ config('app.name') }}</h1>
</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') }}
- **{{ __('emails.sender_email', [], $locale) }}** {{ config('mail.from.address') }}
<p>{{ __('emails.test_email_config_info', [], $locale) }}</p>
{{ __('emails.regards', [], $locale) }}<br>
{{ config('app.name') }}
@endif
@endcomponent
<ul style="list-style: none; padding: 0;">
<li><strong>{{ __('emails.sender_name', [], $locale) }}</strong> {{ config('mail.from.name') }}</li>
<li><strong>{{ __('emails.sender_email', [], $locale) }}</strong> {{ config('mail.from.address') }}</li>
</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>