コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
4839 ビュー

Hi!

I am trying to use the email_from field as receiving address in an email template. These addresses are not in our partner database. Unfortunately most emails come in with special characters like "JohnDoe"<jd@mail.xy>. The characters "<> mess up the mail address created through email_from.

How can I get around this? Thanks for any help!

アバター
破棄
著作者 最善の回答

Thank you for your comments about using RegEx, but there is even a much simpler solution: just use the |safe option.

The field sniplet ${object.email_from|safe} works perfectly.

アバター
破棄
最善の回答

Maybe you can use regexp to clean up the addresses: https://docs.python.org/2/library/re.html

アバター
破棄

Exactly something where regex is made for. +1.

関連投稿 返信 ビュー 活動
2
1月 24
4355
2
1月 24
10046
1
3月 21
9587
0
1月 19
7156
1
3月 15
6945