[MERGE] forward port of branch saas-3 up to fdc6271
[odoo/odoo.git] / openerp / tools / mail.py
index b16a643..1482c42 100644 (file)
@@ -597,7 +597,7 @@ command_re = re.compile("^Set-([a-z]+) *: *(.+)$", re.I + re.UNICODE)
 # Updated in 7.0 to match the model name as well
 # Typical form of references is <timestamp-openerp-record_id-model_name@domain>
 # group(1) = the record ID ; group(2) = the model (if any) ; group(3) = the domain
-reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?.*@(.*)>", re.UNICODE)
+reference_re = re.compile("<.*-open(?:object|erp)-(\\d+)(?:-([\w.]+))?[^>]*@([^>]*)>", re.UNICODE)
 
 # Bounce regex
 # Typical form of bounce is bounce-128-crm.lead-34@domain