@extends('setting.nav') @section('title', 'All Mail Page') @section('content')

Sender All Mail :- {{ $senderEmail }} {{-- Sender Name: {{ $messages->first()->sender_name ?? 'N/A' }} --}}
Sender Name: {{ $messages->first()->sender_name ?? 'N/A' }}
{{--

Messages for User ID: {{ $userId }} and Sender: {{ $senderEmail }}

--}} @if ($messages->count()) @foreach ($messages as $index => $msg) @php // Create DateTime objects in Asia/Kolkata timezone // $sent = new DateTime($mail->sent_date, new DateTimeZone('Asia/Kolkata')); $sent = new DateTime($msg->sent_date); // Let it parse the actual timezone $sent->setTimezone(new DateTimeZone('Asia/Kolkata')); @endphp @endforeach
ID Subject Sent Date Sentiment Action
{{ $index + 1 }} {{ $msg->subject }} {{ $sent->format('d M Y H:i A') }} @php $getting_spam = strpos($msg->label_ids, 'SPAM') !== false ? 1 : 0; @endphp {{ $msg->is_promotion == 1 ? 'Mass mail' : ($getting_spam == 1 ? 'Mass mail' : ucfirst($msg->is_spam_value)) }} View
@else

No messages found.

@endif
{{-- --}} @endsection