查找新模板电子邮件重置密码FOS Fos用户捆绑包

时间:2018-06-12 11:57:21

标签: symfony email fosuserbundle reset

我正在尝试重新格式化从fos用户包重置密码的整个电子邮件。

它被调用的电子邮件文件位于Resources / views / Resetting / email.txt.twig中,我想将其重新格式化为Resources / views / Resetting / email.html.twig。我需要文件采用html格式,因为我需要在电子邮件中添加更多部分。

我看到在Resources / config / mailer.xml中提到了这个tempalte,所以我尝试修改它但不能成功。

有人能解释我如何能够使用Resources / views / Resetting / email.html.twig吗?

1 个答案:

答案 0 :(得分:1)

查看https://symfony.com/doc/current/bundles/FOSUserBundle/emails.html#sending-html-mails

fos_user:
    # ...
service:
    mailer: fos_user.mailer.twig_swift
resetting:
    email:
        template:   '@AppBundle/Resetting/email.html.twig'

您可能需要修改模板路径'@AppBundle/Resetting/email.html.twig'

相关问题