In Lead shows HTML from email rather than plain text

Bug #644325 reported by Julian Robbins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
OpenERP R&D Addons Team 1

Bug Description

With this mail the first part is HTML only, no plain text version, and the footer in plain text only no html. Mail source is attached

This type of mail is not being handled very well by mailgate. The crm module will automatically convert HTML to plain text .. but only if that HTML is part of a multipart email message. The example you gave does not have multiparts, just a "Content-Type:
text/html" header. The CRM mail import does not detect this needs to be run through the HTML to text converter, and thus you get the email with HTML tags.

The fix for this is not simply to do the same as the multipart decoding, as the headers are named differently when the message is not multipart.

The key things are these headers in the email:

Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
 charset="UTF-8"

<FONT face=3D"Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" [...]

Tags: crm trunk
Revision history for this message
Julian Robbins (joolsr) wrote :

Screenshot shows how the email is shown as a Lead in web client

Revision history for this message
Julian Robbins (joolsr) wrote :

We are considering paying to get this work done, as to us it pretty important. That said I really think that having html tags instead of plain text in approx the 1 in 10 of the sales mails (as we get) is a major issue in terms of usability.

I notice that there is now the option to compose mails in HTML in OpenERP (hopefully we'll see an HTML editor too ;-) ); but getting badly formed mails to render properly is also quite an issue.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
status: New → Confirmed
Revision history for this message
Julian Robbins (joolsr) wrote :

Can I ask if/when you are hoping to complete this work? I am looking to get something similar done here, but if its going to be worked on shortly, its better if I wait for you.

Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello,

The fix has been committed to : lp:~openerp-dev/openobject-addons/uco-dev-addons1
with revision: 3456 <email address hidden>

Soon, it will be merged into main addons.

Thanks.

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Julian Robbins (joolsr) wrote :
Download full text (9.3 KiB)

I am running with 6.0 trunk as of 21/12/2010

Hello

I am posting this comment to this existing issue, as I have noticed another related issue re showing html in the opportunity rather than plain text.

I received an email from ABI Research, I have attached the relevant source below.

I have attached a sreenshot showing how the text is incorrectly rendered.

Received: from database5 (database5.abiresearch.com [172.16.1.249])
 by linux-smtp.abiresearch.com (Postfix) with ESMTP id 0AC8641E45B
 for <email address hidden>; Fri, 17 Dec 2010 17:38:24 -0500 (EST)
Message-ID: <26909612.1292625504097.JavaMail.mailer@database5>
From: <email address hidden>
Reply-To: <email address hidden>
To: <email address hidden>
Subject: New Research Cluster: Cloud
Mime-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Date: Fri, 17 Dec 2010 17:38:24 -0500 (EST)

<!-- rid:65835344 --><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitio=
nal//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
    <link rel=3D"stylesheet" type=3D"text/css" href=3D'http://www.abiresear=
ch.com/images/email/email.css?65835344'/>
    <title></title>

</head>
<body>
   =20
    <div id=3D"divContent"><table cellpadding=3D"20" width=3D"100%" style=
=3D"background-color:rgb(238, 243, 251)">

<tbody><tr>

<td align=3D"center">

<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" width=3D"700">

<tbody><tr>

<td align=3D"right" colspan=3D"3"><a href=3D"http://www.abiresearch.com/"><=
img alt=3D"ABI Research" src=3D"http://data.abiresearch.com/eblasts/cluster=
s/abi-logo.png" style=3D"border-top-width:0px;border-right-width:0px;border=
-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:i=
nitial" /></a></td>

</tr>

<tr>

<td colspan=3D"3"><img height=3D"50" width=3D"700" src=3D"http://data.abire=
search.com/eblasts/clusters/cluster-head_01.jpg" alt=3D"" /></td>

</tr>

<tr>

<td rowspan=3D"2"><img height=3D"93" width=3D"17" src=3D"http://data.abires=
earch.com/eblasts/clusters/cluster-head_02.jpg" alt=3D"" /></td>
<td valign=3D"top" height=3D"40" width=3D"473" style=3D"background-color:rg=
b(147, 159, 183);color:white;font-size:24px;font-weight:bold;font-family:ve=
rdana, arial, sans-serif"><a href=3D"http://www.abiresearch.com/products/cl=
uster/Cloud_Research_Cluster" style=3D"color:white;text-decoration:none">Cl=
oud</a></td>
<td rowspan=3D"2"><img height=3D"93" width=3D"210" src=3D"http://data.abire=
search.com/eblasts/clusters/cluster-head_04.jpg" alt=3D"" /></td>

</tr>

<tr>

<td><img height=3D"53" width=3D"473" src=3D"http://data.abiresearch.com/ebl=
asts/clusters/cluster-head_05.jpg" alt=3D"" /></td>

</tr>

</tbody></table>

<table cellpadding=3D"10" width=3D"700" style=3D"text-align:left;font-famil=
y:verdana, arial, sans-serif;font-size:11px;background-color:white">

<tbody><tr>

<td>

=09=09=09=09=09A Research Cluster is a collection of reports and other deli=
verables with a common theme that spans multiple Research Services. Cluster=
s are an ideal way to augment the coverage of our traditional research subs=
criptions.

=09=09=09=09</t...

Read more...

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.