在邮件模板覆盖中插入新行



在这样的电子邮件模板中:https://github.com/plone/Products.PasswordResetTool/blob/master/Products/PasswordResetTool/skins/PasswordReset/mail_password_template.pt

如何在自定义文本中添加新行?

我想说:

Hello
Some text

结果是:

Hello Some text

我认为这与Content-Type: text/plain有关。

更新:

试:

aaa n
aaa
bbb rnrn
bbb
ccc <br>
ccc
ddd <br />
ddd
eee

eeee

结果是一行:

aaa n aaa bbb rnrn bbb ccc <br> ccc ddd <br /> ddd eee eeee

简化模板后,它无需任何特殊技巧即可工作。

<tal:root define="lt string:&lt;;gt string:&gt;;
member python:options['member'];
portal_state context/@@plone_portal_state;
view context/@@passwordreset_view;
isAnon context/@@plone_portal_state/anonymous;
reset python:options['reset']"
>From: <span tal:replace="structure view/encoded_mail_sender" />
To: <span tal:replace="python:member.getProperty('email')" />
Subject: Request to reset your password
Content-Type: text/plain
Precedence: bulk
Hello
Some text
More text
Kind regards
Organization Name
</tal:root>

根据需要返回文本:

Hello
Some text
More text
Kind regards
Organization Name

相关内容

  • 没有找到相关文章

最新更新