Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
5130 Vues

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
Ignorer
Auteur Meilleure réponse

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
Ignorer
Meilleure réponse

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

Avatar
Ignorer

Exactly something where regex is made for. +1.

Publications associées Réponses Vues Activité
2
janv. 24
4749
2
janv. 24
10513
1
mars 21
10019
0
janv. 19
7538
1
mars 15
7243