Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
3 Відповіді
4846 Переглядів

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.

Related Posts Відповіді Переглядів Дія
2
січ. 24
4365
2
січ. 24
10052
1
бер. 21
9590
0
січ. 19
7157
1
бер. 15
6946