HTML emails breaking web interface

Issue #393 resolved
Ben Howell created an issue

This is a new install of the VMware template.

When i click on a text email everything displays correctly however when i click on some HTML emails, all of the text in the interface shrinks to an unreadable size. If you click back on a text email then the interface corrects itself again.

This is what it looks like when you click a HTML email generated from one software package we have: piler_htmlemail.png

The next image is from PRTG network morning software, as you can see the text is smaller but still visible, the search box and menu has also broken.

piler_htmlemailPRTG.png

This is what it looks like for any other email, seems to be some content in the email causing the interface to shrink?

piler_txtemail.png

Any ideas?

Comments (8)

  1. Janos SUTO repo owner

    I assume the css or other formatting interferes with the gui. Can you send me a non-sensitive and problematic email to me? See my address in piler -V

  2. Janos SUTO repo owner

    Edit model/search/message.php, and replace the following (in line 565)

    $chunk = preg_replace("/\<style\>([\w\W]+)\<\/style\>/i", "", $chunk);
    

    with this

    $chunk = preg_replace("/\<style[\w\W]{0,}\>([\w\W]+)\<\/style\>/i", "", $chunk);
    
  3. Ben Howell reporter

    Hello,

    Thank you for the modification, i replaced the line you suggested & the interface is working correctly now however a lot of emails don't display their correct HTML formatting in the preview window. Not just the problem emails but other emails as well sent from outlook etc.

  4. Janos SUTO repo owner

    Well, yes. Unfortunately I can either leave any css definitions as they are, or completely disable them. I've chosen the latter one. I'm not sure if it's possible to discard only some specific css entries (easily), and determining which css entry breaks the gui. Another possible option can be to display the textual part (and not the html).

  5. Ben Howell reporter

    Ok i understand, thank you for looking into this. At least the interface works correctly now :)

  6. Log in to comment