Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
4798 Представления

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
4325
2
янв. 24
10007
1
мар. 21
9563
0
янв. 19
7138
1
мар. 15
6912