{{ message.subject|default:"(no subject)" }}
{% for name in tabs %}
{% if name == "html" %}HTML{% else %}{{ name|capfirst }}{% endif %}{% if name == "attachments" %} ({{ message.attachments|length }}){% endif %}
{% endfor %}
{% if tab == "html" %}
{% elif tab == "text" %}
{{ message.text|default:"(no text body)" }}
{% elif tab == "headers" %}
{% elif tab == "raw" %}
{{ message.raw_text }}
{% elif tab == "attachments" %}
{% for attachment in message.attachments %}
{{ attachment.filename }}
{{ attachment.content_type }} · {{ attachment.content|length|filesizeformat }}
{% empty %}
No attachments.
{% endfor %} {% endif %}