View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0023462 | Plugin - EmailReporting | General | public | 2017-10-11 06:18 | 2026-10-21 14:34 |
| Reporter | libregeek | Assigned To | SL-Gundam | ||
| Priority | normal | Severity | major | Reproducibility | sometimes |
| Status | resolved | Resolution | fixed | ||
| Summary | 0023462: Forwarded HTML mails are saved without the email body | ||||
| Description | Forwarded HTML mails especially sent from bulk email applications are cut off. In most cases the body is completely removed, but in some cases certain sections are saved into description. Please see the screenshot. However, HTML mails composed from gmail/outlook or any other email clients works perfectly. | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
|
Are you using more (|) characters to separate signatures from emails so that they are not imported into the issue? |
|
|
If the above is not applicable then it seems that markdownify is failing at converting this email. Based on the html this email is also quite complex. markdownify is only meant for simple html emails and can convert basic spreadsheet formatted tables. Newsletters and stuff like this are often quite complex because companies want them to look nice and use tables for the layout. markdownify can not deal with this properly Just this alone at the end should tell you enough want kind of stuff is in this email: Do you have any good ideas on how we want EmailReporting to deal with this issue? |
|
|
One idea Setting https://github.com/mantisbt-plugins/EmailReporting/blob/master/core/Mail/Parser.php#L437 But i'm unsure on what the results will be on other htm content. |
|
|
@sl-gundam The signature delimiter I used is I too believe that it's the limitation in markdownify and I also agree with you on the dirty formatting in Newsletters. One probable solution is to get the plain text (without formatting) whenever markdownify fails to get the content. However, I couldn't figure out how to check the failure since it always has some content. This is kind of a complicated case... |
|
|
How about we check with a regex whether there exists a table within a table in the html code If it exists the email is considered complex and will fallback to plaintext |
|
|
I made changes to Markdownify. Nested tables are now ignored. Everything should work better with EmailReporting 0.12.0 and later versions |
|