I’m using the imap PHP functions “fetchstructure” or “imap_body” depending on message type to get the message body from a POP3 account. I first store emails in my database (including HTML) and then my PHP displays emails and their content.
My problem is the following: once I have the emails HTML content, is there any good practice or a common way/function of displaying the HTML emails whithout messing up the rest of my HTML page ?
Should i display emails in plain text format ? And how do other web mail clients do to display HTML stuff… do they parse it ?
PS: i’d rather not use an iframe..
Thanks you for your time,
Romain
I’m not sure i answer my own question here, but do other clients use HTML purifiers ? I’ve found this one, which helps, but that does not give my an answer on how other clients do.
http://htmlpurifier.org/
Seems a great class anyway so i hope it helps.