Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
4770 Widoki

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!

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

Exactly something where regex is made for. +1.

Powiązane posty Odpowiedzi Widoki Czynność
2
sty 24
4267
2
sty 24
9950
1
mar 21
9506
0
sty 19
7101
1
mar 15
6851