Download project

This commit is contained in:
Roman Pyrih
2024-11-20 09:09:44 +01:00
parent 547a138d6a
commit 5ff041757f
40737 changed files with 7766183 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="swiftmailer.command.debug" class="Symfony\Bundle\SwiftmailerBundle\Command\DebugCommand">
<tag name="console.command" command="debug:swiftmailer" />
</service>
<service id="swiftmailer.command.new_email" class="Symfony\Bundle\SwiftmailerBundle\Command\NewEmailCommand">
<tag name="console.command" command="swiftmailer:email:send" />
</service>
<service id="swiftmailer.command.send_email" class="Symfony\Bundle\SwiftmailerBundle\Command\SendEmailCommand">
<tag name="console.command" command="swiftmailer:spool:send" />
</service>
</services>
</container>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://symfony.com/schema/dic/swiftmailer"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://symfony.com/schema/dic/swiftmailer"
elementFormDefault="qualified">
<xsd:element name="config" type="config" />
<xsd:complexType name="config">
<xsd:sequence>
<xsd:element name="mailer" type="mailer" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="stream-options" type="stream-options" minOccurs="0" maxOccurs="1" />
<xsd:element name="antiflood" type="antiflood" minOccurs="0" maxOccurs="1" />
<xsd:element name="spool" type="spool" minOccurs="0" maxOccurs="1" />
<xsd:element name="delivery-whitelist-pattern" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="delivery-address" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="default-mailer" type="xsd:string" />
<xsd:attributeGroup ref="mailer-config" />
</xsd:complexType>
<xsd:complexType name="stream-options">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="stream-option" type="stream-option" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="stream-option" mixed="true">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="stream-option" type="stream-option" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
<xsd:attributeGroup name="mailer-config">
<xsd:attribute name="username" type="xsd:string" />
<xsd:attribute name="password" type="xsd:string" />
<xsd:attribute name="host" type="xsd:string" />
<xsd:attribute name="port" type="xsd:string" />
<xsd:attribute name="encryption" type="encryption" />
<xsd:attribute name="auth-mode" type="auth_mode" />
<xsd:attribute name="timeout" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="source-ip" type="xsd:string"/>
<xsd:attribute name="local-domain" type="xsd:string"/>
<xsd:attribute name="transport" type="xsd:string" />
<xsd:attribute name="logging" type="xsd:string" />
<xsd:attribute name="disable-delivery" type="xsd:boolean" />
<xsd:attribute name="sender-address" type="xsd:boolean" />
<xsd:attribute name="url" type="xsd:string" />
<xsd:attribute name="command" type="xsd:string" />
</xsd:attributeGroup>
<xsd:complexType name="mailer">
<xsd:sequence>
<xsd:element name="stream-options" type="stream-options" minOccurs="0" maxOccurs="1" />
<xsd:element name="antiflood" type="antiflood" minOccurs="0" maxOccurs="1" />
<xsd:element name="spool" type="spool" minOccurs="0" maxOccurs="1" />
<xsd:element name="delivery-whitelist-pattern" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="delivery-address" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attributeGroup ref="mailer-config" />
</xsd:complexType>
<xsd:complexType name="spool">
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="id" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="antiflood">
<xsd:attribute name="threshold" type="xsd:string" />
<xsd:attribute name="sleep" type="xsd:string" />
</xsd:complexType>
<xsd:simpleType name="encryption">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="tls" />
<xsd:enumeration value="ssl" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="auth_mode">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="plain" />
<xsd:enumeration value="login" />
<xsd:enumeration value="cram-md5" />
<xsd:enumeration value="ntlm" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="delivery_strategy">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="realtime" />
<xsd:enumeration value="spool" />
<xsd:enumeration value="single-address" />
<xsd:enumeration value="none" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="swiftmailer.mailer.abstract" class="Swift_Mailer" public="true" abstract="true">
<argument type="service" id="swiftmailer.transport" />
</service>
<service id="swiftmailer.transport.smtp.configurator.abstract" class="Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SmtpTransportConfigurator" abstract="true" public="false" />
<service id="swiftmailer.transport.sendmail.abstract" class="Swift_Transport_SendmailTransport" abstract="true" public="false" />
<service id="swiftmailer.transport.null.abstract" class="Swift_Transport_NullTransport" abstract="true" public="false">
</service>
<service id="swiftmailer.transport.failover" class="Swift_Transport_FailoverTransport" public="false" />
<service id="swiftmailer.transport.buffer.abstract" class="Swift_Transport_StreamBuffer" abstract="true" public="false">
<argument type="service" id="swiftmailer.transport.replacementfactory" />
</service>
<service id="swiftmailer.transport.authhandler.abstract" class="Swift_Transport_Esmtp_AuthHandler" abstract="true" public="false">
<argument type="collection">
<argument type="service"><service class="Swift_Transport_Esmtp_Auth_CramMd5Authenticator" public="false" /></argument>
<argument type="service"><service class="Swift_Transport_Esmtp_Auth_LoginAuthenticator" public="false" /></argument>
<argument type="service"><service class="Swift_Transport_Esmtp_Auth_PlainAuthenticator" public="false" /></argument>
<argument type="service"><service class="Swift_Transport_Esmtp_Auth_NTLMAuthenticator" public="false" /></argument>
</argument>
</service>
<service id="swiftmailer.transport.eventdispatcher.abstract" class="Swift_Events_SimpleEventDispatcher" abstract="true" public="false" />
<service id="swiftmailer.transport.replacementfactory" class="Swift_StreamFilters_StringReplacementFilterFactory" public="false" />
<service id="swiftmailer.plugin.redirecting.abstract" class="Swift_Plugins_RedirectingPlugin" abstract="true" public="false" />
<service id="swiftmailer.plugin.antiflood.abstract" class="Swift_Plugins_AntiFloodPlugin" abstract="true" public="false" />
<service id="swiftmailer.plugin.impersonate.abstract" class="Swift_Plugins_ImpersonatePlugin" abstract="true" public="false" />
<service id="swiftmailer.plugin.messagelogger.abstract" class="Swift_Plugins_MessageLogger" abstract="true" />
<service id="swiftmailer.transport.smtp.abstract" class="Swift_Transport_EsmtpTransport" public="false" abstract="true" />
<service id="swiftmailer.transport.spool.abstract" class="Swift_Transport_SpoolTransport" public="false" abstract="true" />
<service id="swiftmailer.spool.file.abstract" class="Swift_FileSpool" public="false" abstract="true">
<argument>%kernel.root_dir%/../data/swiftmailer/spool</argument>
</service>
<service id="swiftmailer.spool.memory.abstract" class="Swift_MemorySpool" public="false" abstract="true" />
<service id="swiftmailer.email_sender.listener" class="Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener">
<tag name="kernel.event_subscriber" />
<tag name="kernel.reset" method="reset" />
<argument type="service" id="service_container" />
<argument type="service" id="logger" on-invalid="null" />
</service>
<service id="swiftmailer.data_collector" class="Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector" public="false">
<argument type="service" id="service_container" />
</service>
</services>
</container>

View File

@@ -0,0 +1,19 @@
Copyright (c) 2004-2018 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,3 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#AAAAAA" d="M22,4.9C22,3.9,21.1,3,20.1,3H3.9C2.9,3,2,3.9,2,4.9v13.1C2,19.1,2.9,20,3.9,20h16.1c1.1,0,1.9-0.9,1.9-1.9V4.9z M8.3,14.1l-3.1,3.1c-0.2,0.2-0.5,0.3-0.7,0.3S4,17.4,3.8,17.2c-0.4-0.4-0.4-1,0-1.4l3.1-3.1c0.4-0.4,1-0.4,1.4,0S8.7,13.7,8.3,14.1z M20.4,17.2c-0.2,0.2-0.5,0.3-0.7,0.3s-0.5-0.1-0.7-0.3l-3.1-3.1c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l3.1,3.1C20.8,16.2,20.8,16.8,20.4,17.2z M20.4,7.2l-7.6,7.6c-0.2,0.2-0.5,0.3-0.7,0.3s-0.5-0.1-0.7-0.3L3.8,7.2c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6.9,6.9L19,5.8c0.4-0.4,1-0.4,1.4,0S20.8,6.8,20.4,7.2z"/>
</svg>

After

Width:  |  Height:  |  Size: 723 B

View File

@@ -0,0 +1,271 @@
{% 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 %}
<img width="23" height="28" alt="Swiftmailer" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAcCAYAAACK7SRjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0NEOTU1MjM0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0NEOTU1MjQ0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMEQ5OTQ5QzQ5OEMxMUUwODc3MkE1MTY4ODBDMzEzNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3Q0Q5NTUyMjQ5OEUxMUUwODc3MkE1MTY4ODBDMzEzNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpkRnSAAAAJ0SURBVHjaYvz//z8DrQATAw3BqOFYAaO9vT1FBhw4cGCAXA5MipxBQUHT3r17l0AVAxkZ/wkLC89as2ZNIcjlYkALXKnlWqBZTH/+/PEDmQsynLW/v3+NoaHhN2oYDjJn8uTJK4BMNpDhPwsLCwOKiop2+fn5vafEYC8vrw8gc/Lz8wOB3B8gw/nev38vn5WV5eTg4LA/Ly/vESsrK2npmYmJITU19SnQ8L0gc4DxpwgyF2S4EEjB58+f+crLy31YWFjOt7S0XBYUFPxHjMEcHBz/6+rqboqJiZ0qKSnxBpkDlRICGc4MU/j792+2CRMm+L18+fLSxIkTDykoKPzBZ7CoqOi/np6eE8rKylvb29v9fvz4wYEkzYKRzjk5OX/LyMjcnDRpEkjjdisrK6wRraOj8wvokAMLFy788ejRoxcaGhrPCWai4ODgB8DUE3/mzBknYMToASNoMzAfvEVW4+Tk9LmhoWFbTU2NwunTpx2BjiiMjo6+hm4WCzJHUlLyz+vXrxkfP36sDOI/ffpUPikpibe7u3sLsJjQW7VqlSrQxe+Avjmanp7u9PbtWzGQOmCCkARmmu/m5uYfT548yY/V5UpKSl+2b9+uiiz26dMnIWBSDTp27NgdYGrYCIzwE7m5uR4wg2Hg/PnzSsDI/QlKOcjZ3wGUBLm5uf+DwLdv38gub4AG/xcSEvr35s0bZmCB5sgCE/z69SsjyDJKMtG/f/8YQQYD8wkoGf8H51AbG5sH1CpbQBnQ09PzBiiHgoIFFHlBQGwLxLxUMP8dqJgH4k3gIhfIkAKVYkDMTmmhCHIxEL8A4peMo02L4WU4QIABANxZAoDIQDv3AAAAAElFTkSuQmCC" />
<span class="sf-toolbar-status">{{ collector.messageCount }}</span>
{% else %}
{{ include('@Swiftmailer/Collector/icon.svg') }}
<span class="sf-toolbar-value">{{ collector.messageCount }}</span>
{% endif %}
{% endset %}
{% set text %}
<div class="sf-toolbar-info-piece">
<b>Sent messages</b>
<span class="sf-toolbar-status">{{ collector.messageCount }}</span>
</div>
{% if profiler_markup_version == 1 %}
{% for name in collector.mailers %}
<div class="sf-toolbar-info-piece">
<b>{{ name }}</b>
<span>{{ collector.messageCount(name) }}</span>
</div>
<div class="sf-toolbar-info-piece">
<b>Is spooled?</b>
<span>{{ collector.isSpool(name) ? 'yes' : 'no' }}</span>
</div>
{% if not loop.first %}
<hr>
{% endif %}
{% endfor %}
{% else %}
{% for name in collector.mailers %}
<div class="sf-toolbar-info-piece">
<b>{{ name }} mailer</b>
<span class="sf-toolbar-status">{{ collector.messageCount(name)|default(0) }}</span>
&nbsp; (<small>{{ collector.isSpool(name) ? 'spooled' : 'sent' }}</small>)
</div>
{% endfor %}
{% endif %}
{% endset %}
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { 'link': profiler_url }) }}
{% endif %}
{% endblock %}
{% block head %}
{{ parent() }}
<style type="text/css">
/* utility classes */
.m-t-0 { margin-top: 0 !important; }
.m-t-10 { margin-top: 10px !important; }
/* basic grid */
.row {
display: flex;
flex-wrap: wrap;
margin-right: -15px;
margin-left: -15px;
}
.col {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
position: relative;
width: 100%;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}
.col-4 {
flex: 0 0 33.333333%;
max-width: 33.333333%;
}
/* small tabs */
.sf-tabs-sm .tab-navigation li {
font-size: 14px;
padding: .3em .5em;
}
</style>
{% endblock %}
{% block menu %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}
<span class="label {{ collector.messageCount ? '' : 'disabled' }}">
{% if profiler_markup_version == 1 %}
<span class="icon"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAeCAYAAABaKIzgAAAEDElEQVR42u2XWUhUURjHy6isILAebO+lonpJ8qkHM3NFVFxAUVFM0RSXUKnwwdAQn3wQE0MyA1MwBEUQcxvHZTTTHNcZl9DUGqd0JBOzcsZ7+n8XJ0Z0GueOVwg68GfmnLn3O7/7Lee7s4cxZpHq6uos0bb3+Q+6DrG3u7v7RHt7u3tbW9uD5ubm8qamJnlDQ4NKIpG8HhkZOU3X7BYoD9Tb22sjk8mcWltb70ul0pcAegugBfzOjKmzs/MJ7j0kCujw8PBhADkAKAVAz+EZGYA+08bmCN79qdFo7sGmjaWg+wgIIUtoaWl5CqDmxsbGj7SJpYK3uYWFBRnsDmEfWyGg+zs6OkIBNEoGxVB9fT2bnZ1VIHff03xmZuY29rUyF9QWT6sWC5I0OTk5rVAo3unnSqXyEfa1Nhf0Kp5UKRYk8lsDD0oM1/r6+l5h32Pmgl5UqVTP5ubmlEgBHRlCobC8vDzm5eXFHB0dRZWzs/OXsLCwu5SCpkBPo4DaMVRI9rbp6Wk1vnP+/v5kaFfk4eGhAcdJU6Dn+/v7q9aTnpPL5YqVlRV5eXm5Fk+7Gx7lCgsL68Fx2RToWST7C8McQgr8yMrKWkLu/hQz/LDNIZojycnJb8BxwRTocYT8oSEoQs8bSkpK0k5MTGgiIiK4nYYMDg7mcBLIo6OjP9Ec44opUGvIF+eoTg/a1dX1x2BISMgyKncpLS1tbacgU1NT2djY2HxoaOi8fg3jhilQK+gmQvBVD4qQbzDs4+ND6bBWUFCgtRQyJyeHdwSKdcODY9zaTgu9jheMcWOgJFdXV1ZZWclqamp0bm5uQoqGVVRUrFHBuru782tCQC+hW0j/BkpCPlGXIY9wfn5+5hQN5T3dS+cz5btg0DNTU1NFpkBra2tZaWkpy8jIYOPj4ywmJmY7RcMGBwdZZmYmKykpoa7ELPGozeLiYrIetKenZ5OhuLg4ft3T05OfJyQk8LDp6el/LRq6JiUlheb8vXgzY7m5uYJBD0LeeDnRApQ8sKloqK3GxsZuWEPrYzhiWHFx8ZZFMzo6yiIjIw1DTTZ+qNXqMRcXF0GgVpADKltDoCisDcbj4+NZfn7+ll5D9fKeprYbFRXFwsPDWVVV1SodPwEBAVueEtnZ2QNIhTkhoKRrAxhb5WhRURFzcnIyGmIcX9rq6uoPq6urAzqdrresrGwIHtMZux62OOT6AD4FgZ5bXl5+DMhv6P16j/KhCwoK2vHO5O3t/SsxMfG7ENAjkAOUBUkMvMVDiiFKDSGge6Gj0CUoGmffpvwSEfg7dUch/0LtkWcdvr6+a2JDBgYG6tDt6DXPTgjoKegOVAo1QVKR1AgVQ8GQrRDQA+uw9ushuSWSyLYdQRr7K/JP6DcTwr8i7Fj8pwAAAABJRU5ErkJggg==" alt="Swiftmailer" /></span>
{% else %}
<span class="icon">{{ include('@Swiftmailer/Collector/icon.svg') }}</span>
{% endif %}
<strong>E-mails</strong>
{% if collector.messageCount > 0 %}
<span class="count">
<span>{{ collector.messageCount }}</span>
</span>
{% endif %}
</span>
{% endblock %}
{% block panel %}
{% set profiler_markup_version = profiler_markup_version|default(1) %}
{% if profiler_markup_version == 1 %}
<style>
h3 { margin-top: 2em; }
h3 span { color: #999; font-weight: normal; }
h3 small { color: #999; }
h4 { font-size: 14px; font-weight: bold; }
.card { background: #F5F5F5; margin: .5em 0 1em; padding: .5em; }
.card .label { display: block; font-size: 13px; font-weight: bold; margin-bottom: .5em; }
.card .card-block { margin-bottom: 1em; }
</style>
{% endif %}
<h2>E-mails</h2>
{% if not collector.mailers %}
<div class="empty">
<p>No e-mail messages were sent.</p>
</div>
{% endif %}
{% if profiler_markup_version == 1 or collector.mailers|length > 1 %}
<table>
<thead>
<tr>
<th scope="col">Mailer Name</th>
<th scope="col">Num. of messages</th>
<th scope="col">Messages status</th>
<th scope="col">Notes</th>
</tr>
</thead>
<tbody>
{% for name in collector.mailers %}
<tr>
<th class="font-normal">{{ name }}</th>
<td class="font-normal">{{ collector.messageCount(name) }}</td>
<td class="font-normal">{{ collector.isSpool(name) ? 'spooled' : 'sent' }}</td>
<td class="font-normal">{{ collector.isDefaultMailer(name) ? 'This is the default mailer' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="metrics">
{% for name in collector.mailers %}
<div class="metric">
<span class="value">{{ collector.messageCount(name) }}</span>
<span class="label">{{ collector.isSpool(name) ? 'spooled' : 'sent' }} {{ collector.messageCount(name) == 1 ? 'message' : 'messages' }}</span>
</div>
{% endfor %}
</div>
{% endif %}
{% for name in collector.mailers %}
{% if collector.mailers|length > 1 %}
<h3>
{{ name }} <span>mailer</span>
<small>{{ collector.isDefaultMailer(name) ? '(default app mailer)' }}</small>
</h3>
{% endif %}
{% if not collector.messages(name) %}
<div class="empty">
<p>No e-mail messages were sent.</p>
</div>
{% else %}
{% for message in collector.messages(name) %}
{% if loop.length > 1 %}
<h4>E-mail #{{ loop.index }} details</h4>
{% else %}
<h4>E-mail details</h4>
{% endif %}
<div class="card">
<div class="card-block">
<span class="label">Subject</span>
<h2 class="m-t-10">{{ message.headers.get('subject').value ?? '(empty)' }}</h2>
</div>
<div class="card-block">
<div class="row">
<div class="col col-4">
<span class="label">From</span>
<pre class="prewrap">{{ (message.headers.get('from').toString ?? '(empty)')|replace({'From:': ''}) }}</pre>
<span class="label">To</span>
<pre class="prewrap">{{ (message.headers.get('to').toString ?? '(empty)')|replace({'To:': ''}) }}</pre>
</div>
<div class="col">
<span class="label">Headers</span>
<pre class="prewrap">{% for header in message.headers.all if (header.fieldName ?? '') not in ['Subject', 'From', 'To'] %}
{{- header -}}
{% endfor %}</pre>
</div>
</div>
</div>
<div class="card-block">
<div class="sf-tabs sf-tabs-sm">
<div class="tab">
<h3 class="tab-title">Raw content</h3>
<div class="tab-content">
<pre class="prewrap" style="max-height: 600px">
{%- if message.charset is defined and message.charset %}
{{- message.body|convert_encoding('UTF-8', message.charset) }}
{%- else %}
{{- message.body }}
{%- endif -%}
</pre>
</div>
</div>
<div class="tab">
<h3 class="tab-title">Rendered content</h3>
<div class="tab-content">
<iframe class="full-width" style="min-height: 600px" src="data:{{ message.__contentType }};base64,{{ message.__base64EncodedBody }}"></iframe>
</div>
</div>
</div>
</div>
{% for messagePart in message.children if messagePart.contentType in ['text/plain', 'text/html'] %}
<div class="card-block">
<span class="label">Alternative part ({{ messagePart.contentType }})</span>
<pre class="prewrap">
{%- if messagePart.charset is defined and messagePart.charset %}
{{- messagePart.body|convert_encoding('UTF-8', messagePart.charset) }}
{%- else %}
{{- messagePart.body }}
{%- endif -%}
</pre>
</div>
{% endfor %}
{% set attachments = collector.extractAttachments(message) %}
{% if attachments %}
<div class="card-block">
<span class="label">
{% if attachments|length > 1 %}
{{ attachments|length }} Attachments
{% else %}
1 Attachment
{% endif %}
</span>
<ol>
{% for attachment in attachments %}
<li>
Filename:
{{ attachment.filename }}
</li>
{% endfor %}
</ol>
</div>
{% endif %}
</div>
{% endfor %}
{% endif %}
{% endfor %}
{% endblock %}