{% extends "base.html" %} {% block title %}Dernier mail - Debug{% endblock %} {% block content %}

Dernier mail reçu

Compte: {{ account.email }}

Informations du compte (DEBUG)
ID{{ account.id }}
Email{{ account.email }}
Tenant ID{{ account.tenant_id }}
Refresh Token{{ account.refresh_token[:50] }}...
Statut{{ account.connection_status }}
Actif{{ account.is_active }}
{% if mail_data %}
Mail reçu (temps réel)
Sujet{{ mail_data.Subject | default('N/A') }}
Expéditeur{{ mail_data.Sender.EmailAddress.Address if mail_data.Sender else 'N/A' }}
Date réception{{ mail_data.ReceivedDateTime | paris_date }}
ID{{ mail_data.Id | default('N/A') }}

Corps du message (rendu HTML)
{% if mail_data.Body and mail_data.Body.Content %}{{ mail_data.Body.Content | safe }}{% elif mail_data.BodyPreview %}{{ mail_data.BodyPreview | safe }}{% else %}N/A{% endif %}

Corps du message (texte brut - HTML supprimé)
{% if mail_data.Body and mail_data.Body.Content %}{{ mail_data.Body.Content | striptags }}{% elif mail_data.BodyPreview %}{{ mail_data.BodyPreview | striptags }}{% else %}N/A{% endif %}
{% elif mail %}
Mail ID: {{ mail.id }}
Message ID{{ mail.message_id }}
Sujet{{ mail.subject }}
Expéditeur{{ mail.sender }}
Destinataire{{ mail.recipient }}
Reçu le{{ mail.received_at }}
Lu{{ mail.is_read }}

Corps du message (DEBUG)
{{ mail.body }}
{% else %}
Aucun mail trouvé pour ce compte.
{% endif %}
{% endblock %}