2015-11-28 04:28 EST

View Issue Details Jump to Notes ] Wiki ]
IDProjectCategoryView StatusLast Update
0014129Plugin - EmailReporting[All Projects] Generalpublic2013-04-28 14:42
Assigned ToSL-Gundam 
Product Version0.8.4 
Target Version0.9.0Fixed in Version 
Summary0014129: No line brakes with HTML parser
DescriptionI get no line brakes in the description of the mantis items when I send mails. The mail contains HTML, but even after trying a table,

, mantis just dumps all the text as one big text blop in the descripton. Turning off the HTML parser just gives the message that bady was not found.

Is there no other option to get those line brakes in Mantis? This is kind of unreadable..... :(
TagsNo tags attached.
Attached Files
  • txt file icon rawmsg_1333699042_d7df4ea707707b414b594a25985ea029_masked.txt (3,830 bytes) 2012-04-10 04:54 - 
    Delivered-To: support.nl@test.com.test-google-a.com
    Received: by with SMTP id g12csp107491bkq;
            Fri, 6 Apr 2012 00:56:38 -0700 (PDT)
    Received: by with SMTP id dt8mr9650719wib.18.1333698997883;
            Fri, 06 Apr 2012 00:56:37 -0700 (PDT)
    Return-Path: <info@test.com>
    Received: from relay.test.com (relay.test.com. [])
            by mx.google.com with ESMTP id m8ai6138564wed.77.2012.;
            Fri, 06 Apr 2012 00:56:37 -0700 (PDT)
    Received-SPF: pass (google.com: domain of info@test.com designates as permitted sender) client-ip=;
    Authentication-Results: mx.google.com; spf=pass (google.com: domain of info@test.com designates as permitted sender) smtp.mail=info@test.com
    Received: from relay.test.com (mailhost [])
    	by relay.test.com (Postfix) with ESMTP id 152621D948A
    	for <support.nl@test.com.test-google-a.com>; Fri,  6 Apr 2012 09:56:43 +0200 (CEST)
    Received: from SW003 ( by sw003.wdm.local ( with Microsoft
     SMTP Server id; Fri, 6 Apr 2012 09:56:35 +0200
    MIME-Version: 1.0
    From: "Info" <info@test.com>
    To: "Support" <support@test.com>
    CC: "Japie" <japie@test.com>
    Date: Fri, 6 Apr 2012 09:56:35 +0200
    Subject: =?utf-8?B?Q0FTLTAxMzY3LUtKWEM0NiAtIDIwMTFfMDRfMDRfRklBVF9Db3VwbGluZy1xY3JpcHQgVEFTUzAwMDM0NjY=?=
    Content-Type: text/html; charset="utf-8"
    Content-Transfer-Encoding: base64
    Message-ID: <8a2509c4-1611-11c7-1d1b-88a9840ea5b6@SW003.test.local>
    X-Antivirus: avast! (VPS 120405-1, 05-04-2012), Outbound message
    X-Antivirus-Status: Clean

- Relationships
+ Relationships

-  Notes
User avatar


SL-Gundam (manager)

Last edited: 2012-04-06 12:31

View 3 revisions

For the moment there is no other solution available. MantisBT only allows a small amount of html markup. To make the code readable at all we need to convert or strip most of the html markup from the email.

Sometimes this works ok, sometimes this does not work at all.

Normally emails contain a plain text and a html version of the email. EmailReporting tries to find this plain text version but some mail servers do not provide this. Exchange for example needs to have this enabled in the settings for the pop and/or imap protocol on the server to deliver this in the emails when they are retrieved from the servers.

Could you please provide a debug dump of the email in this issue so that i can look into improving this

User avatar


baamster (reporter)

Last edited: 2012-04-06 04:06

View 2 revisions

I could do that, however I need to mask some of the data (content & mails) since this is an automated mail of our CRM system. No other way to test it unfortunatelly....Give me a sec

File attached. Not sure it is very usable since it already pasted all the content after each other?

User avatar


SL-Gundam (manager)

I need the file that starts with "rawmsg"

The parsed email is the end result and useless at this point

Also mask whatever you feel is necessary, just make sure you do not mask to much as we do need some html content for testing
User avatar


baamster (reporter)

there you go....

Can you plz remove the parsed att? Noticed I did not mask it correctly :(
User avatar


SL-Gundam (manager)

alright got it.

Will work on it and see what i can do
User avatar


baamster (reporter)

There is something strange going on as well which might have to do with the same problem.

If I auto forward mails from a gmail adress to the adress that the plugin uses to pick up the issues, I get the text pasted after each other (as stated in this issue).

However, when I forward the same mail manually to the pick up mail adress, it parses the mail correctly. Does it have something to do with the mail settings?
User avatar


SL-Gundam (manager)

Manually using what interface? the gmail web interface?
User avatar


SL-Gundam (manager)

It's too many different factors to be for sure but every mail server in the route the email takes could add or remove a plain text version of the email. Even the sending client could be to blame.
User avatar


SL-Gundam (manager)

Last edited: 2012-04-10 17:07

View 3 revisions

I checked some more and there is a new version of simple_html_dom (the new version is 1.5 and EmailReporting is using 1.11) which currently converts html to plain text for the EmailReporting.

It seems to work a little bit better, though not perfect

It will be included in the final release of 0.9.0 but for now you could try it yourself

Just download it here: http://sourceforge.net/projects/simplehtmldom/files/simplehtmldom/1.5/ [^]
Only replace the simple_html_dom.php file in the "core/Mail/" folder with the new one

I do need to mention that there are no tables in the email you provided to me. It's a combination of < pre > tags and < span > tags containing CSS stylesheets elements, there are no actual tables. All of it is in one big line as well making it rather unreadable. I really wonder what email client would have created this mess

User avatar


baamster (reporter)

Last edited: 2012-04-11 04:27

View 2 revisions

I just replaced the dom file and it surprisingly seems to have some effect. I guess it's now a matter of finding out which markup language works and which doesnt.

The messy mail is probably because we tested some html ourselves and somehow the mailserver does not place the code neatly in the raw message....

As for your initial question; yes the gmail interface.

So big thanks for now since we can move forward!

User avatar


jojow (reporter)

has anyone a workaround for this problem?
we replaced the simple_html_dom.php to version 1.5 but it does not help for html-mails.
User avatar


SL-Gundam (manager)

Last edited: 2012-08-30 11:35

View 2 revisions

Please provide the debug dump (the filename starts with "rawmsg_") of the email so that i can look into it

User avatar


jojow (reporter)

We have changed the settings at our echange server 2010 how you described it in 0014129:0031602 and the problem is solved.
+  Notes

- Issue History
Date Modified Username Field Change
+ Issue History