Cześć,
nie mogę znaleźć informacji jak powinna wyglądać prawidłowa struktura email dla standardowych komunikatów email dla FosUserBundle. Dokumentacja nie wiele mówi: https://symfony.com/doc/2.0/bundles/FOSUserBundle/emails.html.
Mam szablon email.txt.twig
{% trans_default_domain 'FOSUserBundle' %}
{% block subject %}
{%- autoescape false -%}
{{ 'registration.email.subject'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}) }}
{%- endautoescape -%}
{% endblock %}
{% block body_html %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
<body style="margin:0px; background: #f8f8f8; ">
<div width="100%" style="background: #f8f8f8; padding: 0px 0px; font-family:arial; line-height:28px; height:100%; width: 100%; color: #514d6a;">
<div style="max-width: 700px; padding:50px 0; margin: 0px auto; font-size: 14px">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; margin-bottom: 20px">
<tbody>
<tr>
<td style="vertical-align: top; padding-bottom:30px;" align="center"><a href="" target="_blank"><br/>
<img src="" alt="" style="border:none"></a> </td>
</tr>
</tbody>
</table>
<div style="padding: 40px; background: #fff;">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td><b>Witaj,</b>#}
{% autoescape false %}
{{ 'registration.email.message'|trans({'%username%': user.username, '%confirmationUrl%': confirmationUrl}) }}
{% endautoescape %}
<p>Pozdrawiamy serdecznie</p>
<b>Zespół portalu xxx</b> </td>
</tr>
</tbody>
</table>
</div>
<div style="text-align: center; font-size: 12px; color: #b2b2b5; margin-top: 20px">
<p> Powered by xxx Systems <br>
</div>
</div>
</div>
</body>
</html>
{% endblock %}
config.yml
fos_user:
db_driver: orm
firewall_name: main
user_class: Common\UserBundle\Entity\User
from_email:
address: "%mailer_user%"
sender_name: "%mailer_user%"
registration:
form:
type: Common\UserBundle\Form\Type\RegisterUserType
confirmation:
enabled: true
Problem jest w tym że przychodzi wiadomość bez interpretacji HTML. Nagłówek wiadomości email jest
Content-Type: text/plain;