{{-- Flash messages --}} @if(session('error'))
{{ session('error') }}
@endif {{-- Header & Domain Input --}}

{{ __('Email Deliverability Check') }}

{{ __('Check if your domains SPF, DKIM, and DMARC records are properly configured. Correct setup prevents your emails from landing in spam.') }}

@error('domain')

{{ $message }}

@enderror

{{ __('DNS lookups may take a few seconds. Results are cached for 1 hour. Up to 5 checks per hour.') }}

{{-- Loading overlay --}}

{{ __('Running DNS checks for') }} {{ $domain }}...

{{ __('Checking SPF, DKIM, DMARC, and MX records') }}

@if($results) {{-- Overall Score --}}
{{-- Score circle --}}
@php $score = $results['overall_score'] ?? 0; $circumference = 2 * pi() * 54; $dashOffset = $circumference - ($score / 100) * $circumference; $scoreColor = $score >= 80 ? '#22c55e' : ($score >= 50 ? '#eab308' : '#ef4444'); $scoreBg = $score >= 80 ? '#dcfce7' : ($score >= 50 ? '#fef9c3' : '#fef2f2'); @endphp
{{ $score }} / 100
{{-- Score summary --}}

@if($score >= 90) {{ __('Excellent Deliverability') }} @elseif($score >= 70) {{ __('Good Deliverability') }} @elseif($score >= 50) {{ __('Fair Deliverability') }} @elseif($score >= 25) {{ __('Poor Deliverability') }} @else {{ __('Critical Issues Found') }} @endif

@if($score >= 90) {{ __('Your domain') }} {{ $results['domain'] }} {{ __('has properly configured email authentication. Emails from this domain should be delivered reliably to most recipients.') }} @elseif($score >= 70) {{ __('Your domain') }} {{ $results['domain'] }} {{ __('has good email authentication but there is room for improvement. Review the recommendations below.') }} @elseif($score >= 50) {{ __('Your domain') }} {{ $results['domain'] }} {{ __('is partially configured. Some emails may land in spam. Address the issues below to improve deliverability.') }} @else {{ __('Your domain') }} {{ $results['domain'] }} {{ __('has significant email authentication issues. Many emails will be rejected or marked as spam. Immediate action is recommended.') }} @endif

{{-- Quick status badges --}}
@foreach(['spf' => 'SPF', 'dkim' => 'DKIM', 'dmarc' => 'DMARC', 'mx' => 'MX'] as $key => $label) @php $status = $results[$key]['status'] ?? 'fail'; @endphp @if($status === 'pass') @elseif($status === 'warning') @else @endif {{ $label }} @endforeach
{{-- Detailed Results Grid --}}
{{-- SPF Card --}} @php $spf = $results['spf'] ?? []; $spfStatus = $spf['status'] ?? 'fail'; @endphp
@if($spfStatus === 'pass') @elseif($spfStatus === 'warning') @else @endif

{{ __('SPF Record') }}

{{ ucfirst($spfStatus) }}

{{ $spf['details'] ?? __('No data available.') }}

@if(!empty($spf['record']))
{{ $spf['record'] }}
@endif @if(isset($spf['lookup_count']))
DNS lookups: {{ $spf['lookup_count'] }} / 10
@endif
{{-- DKIM Card --}} @php $dkim = $results['dkim'] ?? []; $dkimStatus = $dkim['status'] ?? 'fail'; @endphp
@if($dkimStatus === 'pass') @elseif($dkimStatus === 'warning') @else @endif

{{ __('DKIM Record') }}

{{ ucfirst($dkimStatus) }}

{{ $dkim['details'] ?? __('No data available.') }}

@if(!empty($dkim['selectors_found']))
@foreach($dkim['selectors_found'] as $sel)
{{ __('Selector:') }} {{ $sel['selector'] }} ({{ $sel['type'] }})
@if(isset($sel['record']))

{{ Str::limit($sel['record'], 200) }}

@elseif(isset($sel['target']))

CNAME -> {{ $sel['target'] }}

@endif
@endforeach
@endif
{{-- DMARC Card --}} @php $dmarc = $results['dmarc'] ?? []; $dmarcStatus = $dmarc['status'] ?? 'fail'; @endphp
@if($dmarcStatus === 'pass') @elseif($dmarcStatus === 'warning') @else @endif

{{ __('DMARC Record') }}

{{ ucfirst($dmarcStatus) }}

{{ $dmarc['details'] ?? __('No data available.') }}

@if(!empty($dmarc['policy']))
Policy: {{ $dmarc['policy'] }} @if(!empty($dmarc['has_rua'])) Aggregate Reports @endif @if(!empty($dmarc['has_ruf'])) Forensic Reports @endif
@endif @if(!empty($dmarc['record']))
{{ $dmarc['record'] }}
@endif
{{-- MX Card --}} @php $mx = $results['mx'] ?? []; $mxStatus = $mx['status'] ?? 'fail'; @endphp
@if($mxStatus === 'pass') @else @endif

{{ __('MX Records') }}

{{ ucfirst($mxStatus) }}

{{ $mx['details'] ?? __('No data available.') }}

@if(!empty($mx['records']))
@foreach($mx['records'] as $record) @endforeach
{{ __('Priority') }} {{ __('Mail Server') }}
{{ $record['priority'] }} {{ $record['host'] }}
@endif
{{-- Recommendations --}} @if(!empty($results['recommendations']))

{{ __('Recommendations') }}

{{ __('Steps to improve your email deliverability.') }}

@foreach($results['recommendations'] as $rec)
@if(($rec['severity'] ?? '') === 'critical') {{ __('Critical') }} @elseif(($rec['severity'] ?? '') === 'high') {{ __('High') }} @elseif(($rec['severity'] ?? '') === 'medium') {{ __('Medium') }} @else {{ __('Low') }} @endif
{{ $rec['area'] ?? '' }}

{{ $rec['message'] }}

@if(!empty($rec['dns_record']))
TXT  {{ $rec['dns_record'] }}
@endif
@endforeach
@endif {{-- Score Explanation --}} @if($results)

{{ __('How the score is calculated') }}

30

{{ __('SPF points') }}

30

{{ __('DKIM points') }}

25

{{ __('DMARC points') }}

15

{{ __('MX points') }}

{{ __('Partial configurations (warnings) receive half points. A score of 100 means all email authentication standards are properly configured.') }}

@if(!empty($results['checked_at']))

{{ __('Checked at:') }} {{ \Carbon\Carbon::parse($results['checked_at'])->format('M j, Y g:i A') }}

@endif
@endif @endif