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

Insert new line in mail template override

在这样的电子邮件模板中: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 \r\n\r\n
bbb

ccc <br>
ccc

ddd <br />
ddd

eee


eeee

结果是一行:

aaa \n aaa bbb \r\n\r\n 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>

return我需要的文字:

Hello

Some text

More text

Kind regards
Organization Name