Php Mail() Mails Sent As Potential Spam.. Help!

I'm getting X-warnings from my isp when sending mails from a form with mail(). I also got the same warnings from the email sent by this very forum when I registered!<br /><br />example:<br /><br />----------<br />X-AntiAbuse: This header was added to track abuse, please include it with any abuse report<br />X-AntiAbuse: Primary Hostname - server1.totalchoicehosting.com<br />X-AntiAbuse: Original Domain - dnai.com<br />X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [47 12]<br />X-AntiAbuse: Sender Address Domain - totalchoicehosting.com<br />X-Junkmail-Status: score=0/65, host=mr03.mrf.mail.rcn.net<br />----------<br /><br />I am assuming it has something to do with the following line in the headers:<br /><br />--------<br />Received: from nobody by server1.totalchoicehosting.com with local (Exim 4.24)<br />id 1BMCV6-0006Me-KT<br />for myemail_at_dnai.com; Fri, 07 May 2004 17:03:20 -0400<br />--------<br /><br />Where the mail is being sent from an un-authenticated "nobody" without a resolved ip address.<br /><br />Any idea how to fix this?<br /><br />I also tried phpmailer, using SMTP, it fixed the "nobody" problem, but I still get warnings as in:<br />(note that @'s have been replaced for this example. Also, slothsound.com is my domain at TCH)<br />--------<br /><br />Return-Path: <download_AT_slothsound.com><br />Received: from mr02.mrf.mail.rcn.net (207.172.4.21 [207.172.4.21])<br />by ms08.mrf.mail.rcn.net (Mirapoint Messaging Server MOS 3.2.2-GA FastPath)<br />with ESMTP id DPV66145;<br />Fri, 07 May 2004 02:00:24 -0400 (EDT)<br />Received: from 207.172.4.50 (EHLO mx01.mrf.mail.rcn.net) (207.172.4.50)<br />by mr02.mrf.mail.rcn.net (MOS 3.4.4-GR FastPath queued)<br />with ESMTP id GYX80316;<br />Fri, 07 May 2004 02:00:23 -0400 (EDT)<br />Received: from server24.totalchoicehosting.com ([207.44.242.2])<br />by mx01.mrf.mail.rcn.net with esmtp (Exim 3.35 #7)<br />id 1BLyPH-0000Vu-00<br />for kcs_AT_rcn.com; Fri, 07 May 2004 02:00:23 -0400<br />Received: from server24.totalchoicehosting.com ([207.44.242.2] helo=www.slothsound.com)<br />by server24.totalchoicehosting.com with asmtp (Exim 4.24)<br />id 1BLyP4-0006hM-Pu<br />for kcs_AT_rcn.com; Fri, 07 May 2004 01:00:10 -0500<br />Received: from phpmailer ([24.7.72.203]) <br />by <!-- w --><a class="postlink" href="http://www.slothsound.com">www.slothsound.com</a><!-- w --> with HTTP (PHPMailer);<br />Fri, 7 May 2004 01:00:10 -0500<br />Date: Fri, 7 May 2004 01:00:10 -0500<br />To: kcs_AT_rcn.com<br />From: Conformer Download <download_AT_slothsound.com><br />Subject: Here is the subject<br />Message-ID: <[email protected]><br />X-Priority: 3<br />X-Mailer: PHPMailer [version 1.71]<br />MIME-Version: 1.0<br />Content-Transfer-Encoding: 8bit<br />Content-Type: text/plain<br />X-AntiAbuse: This header was added to track abuse, please include it with any abuse report<br />X-AntiAbuse: Primary Hostname - server24.totalchoicehosting.com<br />X-AntiAbuse: Original Domain - rcn.com<br />X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]<br />X-AntiAbuse: Sender Address Domain - slothsound.com<br />X-Junkmail-Status: score=0/65, host=mr02.mrf.mail.rcn.net<br /><br />---------<!--content-->
Slothso-<br /><br />I thought those AntiAbuse headers are attached no matter what, not when they are reported as spam. <br /><br />As far as the nobody address, I was having problems with that too. Apparently, somehow the server is configured to sendmail from that address if you don't specify some parameters in your mail() function.<br /><br />I use mail() to send email to my Lotus Notes mailbox. This is the mail() I use:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->$mailto = "whoever@****";<br />$subject = "mySubject";<br />$message = "my Message";<br /><br />$name = "Sarah";<br />$mailfrom = "myemail@****";<br /><br />$headers = "Content-type: text/html; charset=iso-8859-1\n";<br />$headers .= "From: ".$name."<".$mailfrom.">\n";<br />$headers .= "Reply-To: ".$name."<$mailfrom>\n";<br />$headers .= "X-Priority: 1\n";<br />$headers .= "X-Mailer: PHP4\n";<br /><br />if (@mail($mailto, $subject, $message, $headers)) <br />{<br />     header("Location: http://www.****"); <br />     exit;<br />}<br />else {<br />     print "<h2>Mail did not send...<br>";<br />     exit;<br />}<!--c2--></div><!--ec2--><br /><br />Try that.. hope this helps.. <br /><br />PS - you may/may not need the /n's at the end of the headers.. or you may need a /r , it depends on what program you are using.<br /><br />Sarah<!--content-->
Well I just looked through some of my old posts and found this thread:<br /><br /><a href="http://www.totalchoicehosting.com/forums/index.php?showtopic=3090&hl=mail" target="_blank">PHP mail() not working!</a><br /><br />Hopefully that will also help you.. <br /><br /><br />Sarah<!--content-->
The X-headers are added to every email leaving the TCH servers. It is to let someone know where to report spam if they get it.<br /><br />Nobody is a default account - if your php is not set right it is probably where that's coming from.<!--content-->
 
Back
Top