تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
4833 أدوات العرض

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 24
4344
2
يناير 24
10036
1
مارس 21
9581
0
يناير 19
7153
1
مارس 15
6934