@extends('layouts.portal') @section('title', 'Email log') @section('subtitle', 'Every message the platform sends, with delivery status, errors and the exact content that was queued.') @section('content') @php $total = $counts->sum(); $failed = (int) ($counts['failed'] ?? 0); $logMode = in_array($driver, ['log', 'array'], true); $statuses = ['sent' => 'Sent', 'queued' => 'Queued', 'failed' => 'Failed', 'skipped' => 'Skipped']; $label = fn ($s) => ucfirst(str_replace('_', ' ', (string) $s)); @endphp
All messages{{ number_format($total) }}Logged since launch
Sent{{ number_format($counts['sent'] ?? 0) }}Accepted by the mail server
Queued{{ number_format($counts['queued'] ?? 0) }}Waiting to be sent
Failed{{ number_format($failed) }}{{ $failed ? 'Open a row to retry it' : 'Nothing needs attention' }}
@if($logMode) Mail driver is “{{ $driver }}”. Messages are recorded here but not delivered to real inboxes. Set MAIL_MAILER and the SMTP details in the server environment to go live. @else Sending through {{ $driver }} as {{ $from }}. Queue: {{ $queue }}{{ $queue === 'sync' ? ' (messages are sent immediately)' : '' }}. @endif
Failed messages can be retried once the cause is fixed. Retrying re-builds the message from its saved template.
@csrf

Send a test email

Confirms that the mail settings work. The result is added to the log below.
@if($logs->isEmpty())
@else
@foreach($logs as $l) @php $retryable = in_array($l->status, ['failed', 'skipped'], true) && ! empty($l->payload['template'] ?? null); @endphp @endforeach
SentRecipientSubjectStatusErrorActions
{{ $l->created_at?->format('d M Y') }}{{ $l->created_at?->format('g:i A') }} {{ $l->to_name ?: $l->to_email }}@if($l->to_name){{ $l->to_email }}@endif {{ $l->subject }}{{ $l->mailable }} · {{ $label($l->category) }} @if($l->status === 'skipped')Skipped@else@endif @if($l->attempts > 1){{ $l->attempts }} attempts@endif @if($l->error){{ $l->error }}@else—@endif
@if($retryable)
@csrf
@endif
{{ $logs->links() }} @endif @endsection @push('scripts')@endpush