Odoo Help


Special characters in e-mail address messing email_from up - What to do?

on 3/24/16, 12:37 PM 279 views


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!

On 4/1/16, 5:34 AM

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.


Ermin Trevisan
on 4/1/16, 7:55 AM

Ermin Trevisan

--Ermin Trevisan--
Ermin Trevisan
| 6 4 7
Walchwil, Switzerland
--Ermin Trevisan--

Ermin Trevisan
On 3/25/16, 2:51 AM

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.

on 3/25/16, 2:58 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/24/16, 12:37 PM
Seen: 279 times
Last updated: 4/1/16, 5:35 AM