From: <ha...@tu...> - 2003-04-16 20:44:06
|
I'm Experiencing the same problem. I think in reading email function, there's a bug in checking for the message header for multipart message. > I am having a problem with SquirrelMail and HTML display. I can HTML mail > and > pick it up with any HTML client and display the message as an HTML > message. > But, if I were to view it with SquirrelMail, the meesage comes back with > FULL > HTML, not formatted, but displays the actual HTML code. > > Inspecting the source of the page shows that the code was converted to its > special characters which the brower will display but not read as HTML. > > What I had to do, was go into squirrelmail code in mime.php line 354 and > basically replace the body variable with the $temp variable which contains > the message before squirrelmail attempted to modify the message. > > Now.. A little more info. The problem only occurs when I send from the PHP > MAIL command line. If I were to send from any EMAIL Client which is HTML > Formatted, Squirrel Mail displays it correctly. If sent from PHP Command > Line, no go. If I were to send from command line and pick up the message > with > any other email client then that client will show the email as HTML > Formatted > and display fine. > > So Basically : > >>From PHP MAIL -> Viewed with SquirrelMail -> Display HTML Code (No >> Formatted) >>From PHP Mail -> Viewed with Any Other Mail Client -> Display Is Fine >>From OutLook Express -> Viewed with Squirrel Mail -> Works fine. > > So, It is the mail command that is the problem. But squirrelmail seems to > be > very picky about what it will display. Here is the code, where am I going > wrong? Why does squirrelmail display the resulting email with code instead > of > formatted. > > $headers .= "From: sb...@yo... \n"; > $headers .= "cc:sb...@yo... \n"; > $headers .= "bcc:sb...@yo... \n"; > $headers .= "Content-Type: html; charset=iso-8859-1\n"; > $contents="This is a test <b>This is my email</b>"; > $to="sb...@yo..."; > $message = stripslashes($contents); > mail($to, $subject, $message, $headers); > > > RESULT VIEWED IN SQUIRREL MAIL > > This is a text <b>This is my email</b>"; > > Something is wrong with my headers that squirrelmail does not deal with > very > well. I know this is really where I should post this message, but this is > the > only program I am having this type of problem. > > Thanks for any help, > Sorry So Long.... > > Scott > > |