alpine Posted April 6, 2006 Share Posted April 6, 2006 Hi,this afternoon i found all emails sendt from my website to be completely blanc - not good!So i did some investigation since i havent recieved any answer from my web host yet, and i found that they have set header info to go along with all php mail, possibly making a conflict with my own header info.previously i had this that worked just great:[code]<?function usermail($reciever,$subject,$message){global $systememail;global $systemname;$time = date("d-m-Y H:i:s");$eol="\r\n";$headers = "From: $systemname <$systemail>".$eol;$headers .= "Reply-To: $systemname <$systemail>".$eol;$headers .= "Return-Path: $systemname <$systemail>".$eol;$headers .= "X-Mailer: PHP v".phpversion().$eol;$headers .= "Date: ".date("r").$eol;$headers .= "Message-ID: <".date("YmdHis")."xxxxxxxxx@".$_SERVER['SERVER_NAME'].">".$eol;$mime_boundary=md5(time());$headers .= 'MIME-Version: 1.0'.$eol;$headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol;$msg = "";$msg .= "--".$mime_boundary.$eol;$msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol;$msg .= "Content-Transfer-Encoding: 8bit".$eol;$message .= "\n\n\n-------------------------------------\nSendt: $time\nEMAIL FOOTER INFO";$msg .= $eol.$eol.$message.$eol.$eol;$msg = wordwrap($msg, 70);if(ini_get('safe_mode')){mail($reciever, $subject, $msg, $headers);}else{mail($reciever, $subject, $msg, $headers, "-f" . $systememail);}return true;}?>[/code]Now i had to remove som header info to make it work[code]<?function usermail($reciever,$subject,$message){global $systememail;global $systemname;$time = date("d-m-Y H:i:s");$eol="\r\n";$headers = "From: $systemname <$systemail>".$eol;$headers .= "Reply-To: $systemname <$systemail>".$eol;$headers .= "Return-Path: $systemname <$systemail>".$eol;$headers .= "X-Mailer: PHP v".phpversion().$eol;$headers .= "Date: ".date("r").$eol;$headers .= "Message-ID: <".date("YmdHis")."xxxxxxxxx@".$_SERVER['SERVER_NAME'].">".$eol;// $mime_boundary=md5(time());// $headers .= 'MIME-Version: 1.0'.$eol;// $headers .= "Content-Type: multipart/related; boundary=\"".$mime_boundary."\"".$eol;$msg = "";// $msg .= "--".$mime_boundary.$eol;// $msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol;// $msg .= "Content-Transfer-Encoding: 8bit".$eol;$message .= "\n\n\n-------------------------------------\nSendt: $time\nEMAIL FOOTER INFO";$msg .= $eol.$eol.$message.$eol.$eol;$msg = wordwrap($msg, 70);if(ini_get('safe_mode')){mail($reciever, $subject, $msg, $headers);}else{mail($reciever, $subject, $msg, $headers, "-f" . $systememail);}return true;}?>[/code]..... and i got my email up and running again. When checking the emails sendt now i find this info added from the host in the headers, and this was not present before i got problems:[code]Mime-Version: 1.0Content-Type: text/plain; charset=UTF-8X-Spam-Status: No, hits=-0.0 required=4.0X-Spam-Report: -0.0 hits, 4.0 required; * -0.0 NO_RELAYS Informational: message was not relayed via SMTP * 0.0 UPPERCASE_25_50 message body is 25-50% uppercaseX-Virus-Scanned: by moam (http://www.moam.net/)X-Moam-Version: 0.92Content-Transfer-Encoding: 8bitX-MIME-Autoconverted: from BASE64 to 8bit by mx02.HOSTNAME REMOVED id k36IuTfJXXXXXXX[/code]In my own headers before this problem i had this in the email headers on my tekst emails:[code]MIME-Version: 1.0Content-Type: multipart/related; boundary="b232cf5dae5155130e18d3848578c7e7"X-Spam-Status: No, hits=-0.0 required=4.0X-Spam-Report: -0.0 hits, 4.0 required; * -0.0 NO_RELAYS Informational: message was not relayed via SMTPX-Virus-Scanned: by moam (http://www.moam.net/)X-Moam-Version: 0.92--b232cf5dae5155130e18d3848578c7e7Content-Type: text/plain; charset=iso-8859-1Content-Transfer-Encoding: 8bitALL EMAIL CONTENT HERE--b232cf5dae5155130e18d3848578c7e7--[/code]This new and unexpected issue has now prevented me from using my html newsmail function aswell since i cannot set my own header info anymore.So, question to you server freaks - any way to go by this if my host wont reverse it ????? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.