Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -r200 -r201 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 200) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 201) @@ -668,8 +668,8 @@ $headers = "Date: ".date("r")."\r\n".$headers; $headers = "Return-Path: ".$objConfig->Get("Smtp_AdminMailFrom")."\r\n".$headers; - $Msg = str_replace("\r\n","\n",$Msg); - $Msg = str_replace("\n","\r\n",$Msg); + //$Msg = str_replace("\r\n","\n",$Msg); + // $Msg = str_replace("\n","\r\n",$Msg); //echo "
"; print_r(htmlentities($headers)); echo "
"; //echo "
"; print_r(htmlentities($Msg)); echo "
"; @@ -678,12 +678,12 @@ $Subject = substr($Subject,9); /* ensure headers are using \r\n instead of \n */ - $headers = str_replace("\r\n","\n",$headers); + //$headers = str_replace("\r\n","\n",$headers); //$headers = str_replace("\n","\r\n",$headers); if(!strlen($objConfig->Get("Smtp_Server")) || !$this->AllowSockets()) { - return mail($To, trim($Subject), $Msg, $headers); + return mail($To,trim($Subject),$Msg,"From: $From\r\n".$headers); } $headers = "Subject: ".trim($Subject)."\r\n".$headers; @@ -813,13 +813,13 @@ if($HasFile) { //Messages start with text/html alternatives in OB - $headers.='Content-Type: multipart/alternative; boundary="'.$this->textboundary.'"'."\n\n"; - $msg ="This is a multi-part message in MIME format.\n\n"; + $headers.="Content-Type: multipart/mixed;\n\tboundary=\"".$OB."\"\n\n"; + $msg ="This is a multi-part message in MIME format.\r\n"; $msg.="--".$OB."\n"; - $msg.="Content-Type: multipart/alternative; boundary=\"".$boundary."\"\r\n\r\n"; + $msg.="Content-Type: multipart/alternative; boundary=\"$boundary\"\n\n"; } else - $headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\""; + $headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"\n\n"; if(is_array($extra_headers)) { for($i=0;$i