Compare commits
5 Commits
3a5ac9c130
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 147231f216 | |||
| 80c4f621de | |||
| 4fef8dc165 | |||
| 4283944f33 | |||
| d51688aa2b |
@@ -47,6 +47,13 @@ return [
|
|||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
'timeout' => null,
|
'timeout' => null,
|
||||||
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
'local_domain' => env('MAIL_EHLO_DOMAIN', parse_url((string) env('APP_URL', 'http://localhost'), PHP_URL_HOST)),
|
||||||
|
'stream' => [
|
||||||
|
'ssl' => [
|
||||||
|
'allow_self_signed' => true,
|
||||||
|
'verify_peer' => false,
|
||||||
|
'verify_peer_name' => false,
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
@@ -115,4 +122,22 @@ return [
|
|||||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Markdown Mail Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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">
|
||||||
|
<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>
|
||||||
|
|
||||||
{{ __('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>
|
||||||
</div>
|
<li><strong>{{ __('emails.sender_email', [], $locale) }}</strong> {{ config('mail.from.address') }}</li>
|
||||||
@else
|
</ul>
|
||||||
# {{ __('emails.test_email_title', [], $locale) }}
|
</div>
|
||||||
|
|
||||||
{{ __('emails.test_email_body', [], $locale) }}
|
<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>
|
||||||
{{ __('emails.test_email_timestamp', ['time' => now()->format('Y-m-d H:i:s')], $locale) }}
|
</div>
|
||||||
|
</body>
|
||||||
{{ __('emails.test_email_config_info', [], $locale) }}
|
</html>
|
||||||
|
|
||||||
- **{{ __('emails.sender_name', [], $locale) }}** {{ config('mail.from.name') }}
|
|
||||||
- **{{ __('emails.sender_email', [], $locale) }}** {{ config('mail.from.address') }}
|
|
||||||
|
|
||||||
{{ __('emails.regards', [], $locale) }}<br>
|
|
||||||
{{ config('app.name') }}
|
|
||||||
@endif
|
|
||||||
@endcomponent
|
|
||||||
|
|||||||
@@ -87,7 +87,12 @@ new class extends Component {
|
|||||||
Mail::to(Auth::user())->send(new TestEmail($locale));
|
Mail::to(Auth::user())->send(new TestEmail($locale));
|
||||||
Session::flash('test-email-sent', true);
|
Session::flash('test-email-sent', true);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
\Log::error('Test email failed: ' . $e->getMessage(), [
|
||||||
|
'exception' => get_class($e),
|
||||||
|
'trace' => $e->getTraceAsString(),
|
||||||
|
]);
|
||||||
Session::flash('test-email-failed', true);
|
Session::flash('test-email-failed', true);
|
||||||
|
Session::flash('test-email-error', $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}; ?>
|
}; ?>
|
||||||
@@ -160,6 +165,11 @@ new class extends Component {
|
|||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<flux:callout variant="danger" icon="exclamation-triangle">
|
<flux:callout variant="danger" icon="exclamation-triangle">
|
||||||
{{ __('admin.test_email_failed') }}
|
{{ __('admin.test_email_failed') }}
|
||||||
|
@if (session('test-email-error'))
|
||||||
|
<div class="mt-2 text-sm opacity-80">
|
||||||
|
{{ session('test-email-error') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</flux:callout>
|
</flux:callout>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user