{% extends 'Core/Layout/Templates/Mails/Default.html.twig' %}

{% block title %}
  <title>{{ SITE_TITLE }} - {{ 'msg.FormBuilderSubject'|trans|format(name) }}</title>
{% endblock %}

{% block main %}
  <h2>{{ SITE_TITLE }}: {{ subject|format(name) }}</h2>
  <hr />
  {% if is_confirmation_mail %}
    <p>{{ 'msg.YouJustSentTheFollowingMessage'|trans }}</p>
    <hr>
  {% endif %}
  <h3>{{ 'lbl.SenderInformation'|trans|ucfirst }}</h3>
  <p>
    <strong>{{ 'lbl.SentOn'|trans|ucfirst }}:</strong><br />
    {{ sentOn|spoondate(dateFormatLong, LANGUAGE) }}
  </p>

  <h3>{{ 'lbl.Content'|trans|ucfirst }}</h3>
  {% for field in fields %}
    <p><strong>{{ field.label }}:</strong><br /> {{ field.value|raw }}</p>
  {% endfor %}
{% endblock %}

{% extends 'Core/Layout/Templates/Mails/Default.html.twig' %}

{% block title %}
  <title>{{ SITE_TITLE }} - {{ 'msg.FormBuilderSubject'|trans|format(name) }}</title>
{% endblock %}

{% block main %}
  <h2>{{ SITE_TITLE }}: {{ subject|format(name) }}</h2>
  <hr />
  {% if is_confirmation_mail %}
    <p>{{ 'msg.YouJustSentTheFollowingMessage'|trans }}</p>
    <hr>
  {% endif %}
  <h3>{{ 'lbl.SenderInformation'|trans|ucfirst }}</h3>
  <p>
    <strong>{{ 'lbl.SentOn'|trans|ucfirst }}:</strong><br />
    {{ sentOn|spoondate(dateFormatLong, LANGUAGE) }}
  </p>

  <h3>{{ 'lbl.Content'|trans|ucfirst }}</h3>
  {% for field in fields %}
    <p><strong>{{ field.label|raw }}{% if field.value %}:{% endif %}</strong>
      {% if field.value %}
        <br />
        {{ field.value|replace({'<br />\r\n' : '\r\n','<br>\r\n' : '\r\n','<br />' : '\r\n','<br>' : '\r\n'})|e|nl2br|raw }}
      {% endif %}
    </p>
  {% endfor %}
{% endblock %}

Make the email from the form builder safer
Make the email from the form builder safer
