Getting mail() to work with YAHOO! and other mail services

From: Date: Fri, 18 Apr 2003 20:05:12 +0000
Subject: Getting mail() to work with YAHOO! and other mail services
Groups: php.general 
Request: Send a blank email to php-general+get-144430@lists.php.net to get a copy of this message
I have a script that is intended to email a user a new password, when they have forgotten their old one. The script works perfectly, except when being sent to my YAHOO! email address (and I am told the same is true for Hotmail). There is no error message, and as far as the mail server is concerned, the email is sent without a problem. It just never shows up on the other end. The script is very simple: mail($useremail, $subject, $message, "From: customerservice@essaytech.com\r\n", "Reply-To: customerservice@essaytech.com"); I have tried various header configurations that I have found in the documentation, and on other sites. For example, this send_mail() function (which I couldn't get to send out any messages, at all). send_mail("member@essaytech.com", $memberEMAIL,"Essaytech Executives", $list, $subject, $usermessage); function send_mail($sendername, $senderemail, $contactname, $contactemail, $subject, $message) { $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n"; $headers .= "X-Priority: 1\r\n"; $headers .= "X-MSMail-Priority: High\r\n"; $headers .= "X-Mailer: PHP\r\n"; $headers .= "To: ".$contactname." < ".$contactemail." >\r\n"; $headers .= "From: ".$sendername."< ".$senderemail." >\r\n"; I am running PHP 4.2 on Windows XP, on a shared infrastructure at a web host. I am relatively new to PHP (a couple of weeks), so any help that anyone can provide would be greatly appreciated. Thanks -- Rob Clockedile rclockedile@essaytech.com

« previous php.general (#144430) next »