Skip to content

Commit

Permalink
[Mailer] Simplify fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HypeMC committed Feb 14, 2024
1 parent 4c0a1fc commit 04332db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Resources/views/Collector/mailer.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
{# Email instance #}
<h2 class="m-t-10">{{ message.getSubject() ?? '(empty)' }}</h2>
{% elseif message.headers.has('subject') %}
<h2 class="m-t-10">{{ message.headers.get('subject').toString()|split(': ', 2)[1]|default('(empty)') }}</h2>
<h2 class="m-t-10">{{ message.headers.get('subject').bodyAsString()|default('(empty)') }}</h2>
{% else %}
<h2 class="m-t-10">(empty)</h2>
{% endif %}
Expand All @@ -136,7 +136,7 @@
{# Email instance #}
<pre class="prewrap">{{ message.getFrom()|map(addr => addr.toString())|join(', ')|default('(empty)') }}</pre>
{% elseif message.headers.has('from') %}
<pre class="prewrap">{{ message.headers.get('from').toString()|split(': ', 2)[1]|default('(empty)') }}</pre>
<pre class="prewrap">{{ message.headers.get('from').bodyAsString()|default('(empty)') }}</pre>
{% else %}
<pre class="prewrap">(empty)</pre>
{% endif %}
Expand All @@ -146,7 +146,7 @@
{# Email instance #}
<pre class="prewrap">{{ message.getTo()|map(addr => addr.toString())|join(', ')|default('(empty)') }}</pre>
{% elseif message.headers.has('to') %}
<pre class="prewrap">{{ message.headers.get('to').toString()|split(': ', 2)[1]|default('(empty)') }}</pre>
<pre class="prewrap">{{ message.headers.get('to').bodyAsString()|default('(empty)') }}</pre>
{% else %}
<pre class="prewrap">(empty)</pre>
{% endif %}
Expand Down

0 comments on commit 04332db

Please sign in to comment.