FW: Getting mail() to work with YAHOO! and other mail services
| From: | Robert Clockedile | Date: | Fri, 18 Apr 2003 20:09:21 +0000 |
| Subject: | FW: Getting mail() to work with YAHOO! and other mail services | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144431@lists.php.net to get a copy of this message | ||
Oops! I missed the last line of the send_mail() function when I copied and
pasted. It ends with:
return (mail("\"".$contactname."\"
<".$contactemail.">\"", $subject,
$message, $headers));
Thanks, again, for any help you can give.
--
Rob Clockedile
rclockedile@essaytech.com
> -----Original Message-----
> From: Robert Clockedile [mailto:rclocked@maine.rr.com]
> Sent: Friday, April 18, 2003 4:05 PM
> To: php-general@lists.php.net
> Subject: Getting mail() to work with YAHOO! and other mail services
>
> 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