Here's the code I'm using to send the message and the eregi_replace:
$msgcontent = eregi_replace("\r\n"," ",$newsContent);
$sendToEmail = mysql_escape_string($_POST['sendToEmail']);
$headers = "From: $FromName";
mail($sendtoEmail,"News from ",$headers,
$msgcontent);
This is the result that I see in my Outlook 2002 e-mail client.
What started out as a damp, summer morning turned cooler and wetter by the middle of the ceremony. Sitting within Harvard\\\\'s Tercentenary Theatre, the centerpiece of the famed Harvard Yard, there was little protection from the elements. The rain could not dampen the spirits of the graduating class of 2002.\r\n\r\nThe procession into the Theatre took a while with over 32,000 degree candidates participating. The Lord Sherriff of Suffolk County struck his silver-tipped staff three times and called the meeting to order. Harvard\\\\'s President presided over the ceremony in a chair that was over 250 years old.
I tried running an eregi_replace to get rid of the \\\'s, but the same number of slashes appeared in the output. The breaks in my text were done using a carriage return since the text was entered through a form. I need to be able to get the slashes, \r\n out and keep the paragraph breaks.
Any suggestions?