Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
4855 Visninger

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!

Avatar
Kassér
Forfatter Bedste svar

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.

Avatar
Kassér
Bedste svar

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

Avatar
Kassér

Exactly something where regex is made for. +1.

Related Posts Besvarelser Visninger Aktivitet
2
jan. 24
4388
2
jan. 24
10105
1
mar. 21
9602
0
jan. 19
7172
1
mar. 15
6967