View Issue Details

IDProjectCategoryView StatusLast Update
0002217SOGoWeb Mailpublic2013-09-19 20:15
Reporterhboterman Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.4a 
Target Version2.1.0 
Summary0002217: html-mails should offer plaintext alternative... for smartphone native mail client
Description

We are using SogoSync to access SOGo on SmartPhone (works pretty well) but HTML mails are:

1) malformed : There is no html, head, and body tag used
2) badly viewed : accents and specials char are viewed as &xxx; ('>' viewed as '>' for example).

Mail with accented chars replaced with html patterns (like "é" instead of "é") are very-very hard to read ! For example, french word for "summer" is "été" and is displayed "été" on smartphone...

TagsNo tags attached.

Relationships

has duplicate 0000729 resolvedludovic Send plain text email aswell as HTML 

Activities

hboterman

hboterman

2013-02-01 11:44

reporter   ~0005305

Sorry, html tags are interpreted in this tickets:

...
Mail with accented chars replaced with html patterns (like "& eacute;" instead of "é") are very-very hard to read ! For example, french word for "summer" is "été" and is displayed "& eacute;t& eacute;" on smartphone...
...

Christian Mack

Christian Mack

2013-02-05 16:58

developer   ~0005337

Isn't that a SogoSync problem?

Perhaps you should report that at
https://github.com/xbgmsharp/sogosync/issues

hboterman

hboterman

2013-02-06 14:50

reporter   ~0005356

Not at all, try this:
In SOGo, send an HTML mail, go to Sent Box, and view generated source code by right-clicking it and select "View source code".
You'll see mail headers (Return-path, Received, User-Agent, from, to, content/type = text/html, charset=utf-8, etc...) and your message "badly" html encoded !
Real HTML compliant documents have to start with "html", "head"..."/head" and "body" tags and ends with "/body" tag.
If viewed outside the entire SOGo web page, browsers (even desktop known browsers) won't switch in HTML mode and will display this mail in text mode, showing HTML codes.

Try to view foreign HTML mail (not composed by SOGo), you'll find three parts:
-mail headers with multipart switch
-1st part follow with text encoded mail body
-2nd part follow with html encoded mail body (watch out html, head and body tags!)

Since SOGo doesn't generate multiparts mails and doesn't compose real html compliant mails, these mails can't be viewed on smartphones/tablets.

dani

dani

2013-03-15 11:06

reporter   ~0005420

I agree at least part of the problem is from SOGo. When I send an HTML mail from SOGo on a spamassassin protected server, this check is triggered:

HTML_MIME_NO_HTML_TAG

which, according to this: http://wiki.apache.org/spamassassin/Rules/HTML_MIME_NO_HTML_TAG means that the <html></html> tags are missing (and indeed, looking at the source, we see that those tags are missing)

This check is also triggered: MIME_HTML_ONLY, which can be avoided if the mail offers a plain text version as an alternative/multipart

ludovic

ludovic

2013-08-09 20:31

administrator   ~0005870

We could use libxml to do this for us quite easily - using code like that:

void walkTree(xmlNode a_node) {
xmlNode
cur_node = NULL;
for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
if (cur_node->type == XML_TEXT_NODE) {
printf("%s", cur_node->content);
}
walkTree(cur_node->children);
}
}

void main () {
htmlParserCtxtPtr parser = htmlCreatePushParserCtxt(NULL, NULL, NULL, 0, NULL, 0);
htmlCtxtUseOptions(parser, HTML_PARSE_NOBLANKS | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING | HTML_PARSE_NONET);
len = ReadFile(data);
htmlParseChunk(parser, data, len, 0);
walkTree(xmlDocGetRootElement(parser->myDoc));
}

ludovic

ludovic

2013-09-19 20:15

administrator   ~0006025

https://github.com/inverse-inc/sogo/commit/91f1ab6a60af2404b49dc435c246b5836ccb3f91

Issue History

Date Modified Username Field Change
2013-01-31 13:51 hboterman New Issue
2013-02-01 11:44 hboterman Note Added: 0005305
2013-02-05 16:58 Christian Mack Note Added: 0005337
2013-02-06 14:50 hboterman Note Added: 0005356
2013-03-15 11:06 dani Note Added: 0005420
2013-08-09 20:28 ludovic Target Version => 2.1.0
2013-08-09 20:28 ludovic Description Updated
2013-08-09 20:31 ludovic Note Added: 0005870
2013-09-19 20:15 ludovic Note Added: 0006025
2013-09-19 20:15 ludovic Status new => closed
2013-09-19 20:15 ludovic Resolution open => fixed
2013-09-27 18:43 ludovic Relationship added has duplicate 0000729