To{{ $log->to_name }} <{{ $log->to_email }}>
Created{{ $log->created_at->format('d M Y, h:i A') }}
Sent{{ $log->sent_at?->format('d M Y, h:i A') ?? '—' }}
Attempts{{ $log->attempts }}
Template{{ $log->template_key ?? $log->mailable }}
Related{{ $log->relatedLabel() ?? '—' }}
@if($log->course)
Course{{ $log->course->title }}
@endif
Sent by{{ $log->sender?->name ?? 'Automation' }}
@if($attachments)
Attachments{{ implode(', ', array_map(fn ($a) => str_replace('_', ' ', $a), $attachments)) }}
@endif
@if($log->custom_message)
Personal message
{{ $log->custom_message }}
@endif
@if($log->error)
@endif
@if(in_array($log->status, ['failed', 'skipped'], true))
@endif