I want to display emails in my site, by using PHP imap. It works fine. But when I display the HTML- Body of the mail, the CSS rules destroy my site layout.
<div id="mail"><?php echo $mail->HTMLbody; ?></div>
I write a function, for looking and deleting the CSS rules in $mail->HTMLbody
, it works but some of the CSS rules are necessary for the mail-layout.
I have only the idea, t look in the string and add infront of each rule '#mail', but I hpe there is better to do this. Have you any ideas?