{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if collector.messageCount %} {% set icon %} {% if profiler_markup_version == 1 %} Swiftmailer {{ collector.messageCount }} {% else %} {{ include('@Swiftmailer/Collector/icon.svg') }} {{ collector.messageCount }} {% endif %} {% endset %} {% set text %}
Sent messages {{ collector.messageCount }}
{% if profiler_markup_version == 1 %} {% for name in collector.mailers %}
{{ name }} {{ collector.messageCount(name) }}
Is spooled? {{ collector.isSpool(name) ? 'yes' : 'no' }}
{% if not loop.first %}
{% endif %} {% endfor %} {% else %} {% for name in collector.mailers %}
{{ name }} mailer {{ collector.messageCount(name)|default(0) }}   ({{ collector.isSpool(name) ? 'spooled' : 'sent' }})
{% endfor %} {% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }} {% endif %} {% endblock %} {% block menu %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if profiler_markup_version == 1 %} Swiftmailer {% else %} {{ include('@Swiftmailer/Collector/icon.svg') }} {% endif %} E-Mails {% if collector.messageCount > 0 %} {{ collector.messageCount }} {% endif %} {% endblock %} {% block panel %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if profiler_markup_version == 1 %} {% endif %}

E-mails

{% if not collector.mailers %}

No e-mail messages were sent.

{% endif %} {% if profiler_markup_version == 1 or collector.mailers|length > 1 %} {% for name in collector.mailers %} {% endfor %}
Mailer Name Num. of messages Messages status Notes
{{ name }} {{ collector.messageCount(name) }} {{ collector.isSpool(name) ? 'spooled' : 'sent' }} {{ collector.isDefaultMailer(name) ? 'This is the default mailer' }}
{% else %}
{% for name in collector.mailers %}
{{ collector.messageCount(name) }} {{ collector.isSpool(name) ? 'spooled' : 'sent' }} {{ collector.messageCount(name) == 1 ? 'message' : 'messages' }}
{% endfor %}
{% endif %} {% for name in collector.mailers %} {% if collector.mailers|length > 1 %}

{{ name }} mailer {{ collector.isDefaultMailer(name) ? '(default app mailer)' }}

{% endif %} {% if not collector.messages(name) %}

No e-mail messages were sent.

{% else %} {% for message in collector.messages(name) %} {% if loop.length > 1 %}

E-mail #{{ loop.index }} details

{% else %}

E-mail details

{% endif %}
Message headers
{% for header in message.headers.all %}
                            {{- header -}}
                        {% endfor %}
Message body
                            {%- if messagePart.charset is defined and message.charset %}
                                {{- message.body|convert_encoding('UTF-8', message.charset) }}
                            {%- else %}
                                {{- message.body }}
                            {%- endif -%}
                        
{% for messagePart in message.children if messagePart.contentType in ['text/plain', 'text/html'] %}
Alternative part ({{ messagePart.contentType }})
                                {%- if messagePart.charset is defined and messagePart.charset %}
                                    {{- messagePart.body|convert_encoding('UTF-8', messagePart.charset) }}
                                {%- else %}
                                    {{- messagePart.body }}
                                {%- endif -%}
                            
{% endfor %} {% set attachments = collector.extractAttachments(message) %} {% if attachments %}
{% if attachments|length > 1 %} {{ attachments|length }} Attachments {% else %} 1 Attachment {% endif %}
    {% for attachment in attachments %}
  1. Filename: {{ attachment.filename }}
  2. {% endfor %}
{% endif %}
{% endfor %} {% endif %} {% endfor %} {% endblock %}