[6.1 ]Get mail dose not attach the mail propely

Bug #1108847 reported by Matteo Boscolo
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

in the function message_forward inside mail_thred.py if the value of the field msg['From'] is somthing like "<email address hidden>" <email address hidden> the to_email function return a dictionary like this ['"<email address hidden>"', '<email address hidden>'] and this is wrong for the from field.

Old code was:
smtp_from= to_email(msg['From'])

I patch the code like this:

smtp_from=[]
for mFrom in to_email(msg['From']):
    smtp_from = [mFrom]
    break

regards,
Matteo

Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Matteo Boscolo ,

I have cheked it with 6.1 but I did not face this problem.
when msg['From'] is like "Person Name" <test@tinyerp,com> then
to_email(msg['From']) return correct value "<email address hidden>".
So would please check this again and provide detail information regarding this issue.

Thanks and waiting for reply.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Matteo Boscolo (matteo-boscolo-omniasolutions) wrote :

I try it again on a debug session,
if you put a brake point to the first line of the message_forward and try to execute the following code you get this problem.
code:
>>> <email address hidden>" <email address hidden> '
>>> to_email(a)
['"<email address hidden>"', '<email address hidden>']

with your code :
 "Person Name" <test@tinyerp,com> it work fine, becouse "Person Name" is differen then <test@tinyerp,com> but if the name is the some, like in my exsample:
<email address hidden>" <email address hidden>'
to_email(b)
['"<email address hidden>"', '<email address hidden>']

bum .. you get the error ..

regards,
Matteo

affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: Incomplete → Confirmed
summary: - 6.1 Get mail dose not attach the mail propely
+ [6.1 ]Get mail dose not attach the mail propely
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.