Mail sender name removed

Bug #1272610 reported by Carlos Vásquez (ClearCorp)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Committed
Low
OpenERP Publisher's Warranty Team

Bug Description

When some module (ie: mail) calls the buld_message method of ir.mail_server, with a sender name without quotes but with UTF8 characters, the name gets removed.

For example, my name is Carlos Vásquez (note the accent on the a). So when I send and email from OpenERP, the mail module makes the message with From: Carlos Vásquez <email address hidden>. Note that the name is not surrounded with quotes, as it is not necessary to be valid. This is the actual From: line sent from the mail module to the ir.mail_server build_message method.

The email_from read from the message gets encoded with RFC2822 because of the accent, and the encode_rfc2822_address_header method (openerp/addons/base/ir/ir_mail_server.py) use the name_with_email_pattern regex to separate name from email and do the encoding. But that regex expects quotes around the name, so it never matches and no encoding is done. The result is the message being built with only the address as the sender: From: <email address hidden>. The name is removed.

To fix this, the name_with_email_pattern regex has to work either with or without quotes. I will make a MP with the fix.

Regards

Tags: maintenance

Related branches

Changed in openobject-server:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-server:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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