← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 644325] Re: In Lead shows HTML from email rather than plain text

 

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.

-- 
In Lead shows HTML from email rather than plain text
https://bugs.launchpad.net/bugs/644325
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: New

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" [...]