Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
4832 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Risposta migliore

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

Avatar
Abbandona

Exactly something where regex is made for. +1.

Post correlati Risposte Visualizzazioni Attività
2
gen 24
4344
2
gen 24
10035
1
mar 21
9579
0
gen 19
7153
1
mar 15
6933