{{-- Honest e-mail delivery state. "Sent" appears ONLY after the mail server accepted the message. --}} @php $status = $delivery?->status ?? 'not_configured'; $key = strtoupper($status); $tone = ['sent' => 'bg-success-soft text-success', 'failed' => 'bg-red-50 text-destructive', 'pending' => 'bg-info-soft text-accent-foreground', 'sending' => 'bg-info-soft text-accent-foreground', 'not_configured' => 'bg-warning-soft text-warning'][$status]; @endphp

{{ __('reports.delivery.title') }}

{{ __('reports.delivery.status.'.$key) }}

{{ __('reports.delivery.statusHint.'.$key) }}

{{ __('reports.delivery.recipient') }}
{{ $delivery?->recipient_email ?? __('reports.delivery.recipientNone') }}
{{ __('reports.delivery.attempts') }}
{{ $delivery?->attempts ?? 0 }}
@if ($delivery?->sent_at)
{{ __('reports.delivery.sentAt') }}
{{ $delivery->sent_at->setTimezone(config('qw.business_timezone'))->format('d.m.Y H:i') }}
@endif
@if ($status === 'not_configured')

@if (! $email['recipientKnown']){{ __('reports.delivery.reason.recipient') }}@endif @unless ($email['configured'] || $email['reason'] !== \App\Services\WeeklyDeliveryService::NOT_CONFIGURED_SMTP) {{ __('reports.delivery.reason.smtp') }}@endunless

@endif @if ($delivery?->last_error && $status === 'failed')

{{ $delivery->last_error }}

@endif @if (in_array($status, ['pending', 'failed', 'not_configured'], true) && $email['configured']) @endif @if ($mailNotice)

{{ $mailNotice === 'sent' ? __('reports.delivery.toast.sent') : __('reports.delivery.toast.notSent') }}

@endif