note 25627 added to ref.mail
| From: | pvlasenko at hotmail dot com | Date: | Tue, 01 Oct 2002 00:20:35 +0000 |
| Subject: | note 25627 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37447@lists.php.net to get a copy of this message | ||
I had trouble sending emails with mail()function some peple would get the emails then other would
not, I had partialy solved this problem (see my post above) with avoiding mail function. It solved
the problem but still for example hotmail would only get 3/10 sometimes 0/10 messages, I have now
compleately solved this problem by adding ALL REQIRED headers and changing the sendmail path with
envelope matching address ......
ini_set(sendmail_path, "/usr/sbin/sendmail -t -f webmaster@domain.com");
//Contents of an Registration Auto responce email(text format)
$message = "Thanks for registering".$userName;
$headers .= "From: Name<webmaster@domain.com>\n";
$headers .= "Reply-To: <webmaster@domain.com>\n";
$headers .= "X-Sender: <webmaster@domain.com>\n";
$headers .= "X-Mailer: PHP4\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <webmaster@domain.com>\n";
mail($email,"Registration COnfirmation",wordwrap(stripslashes($message)),$headers);
//Uncomment this to send html format
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
//$headers .= "cc: birthdayarchive@php.net\n"; // CC to
//$headers .= "bcc: mail@server.com"; // BCCs to, separete multiple with commas
mail@mail.com, mail2@mail.com
--
http://www.php.net/manual/en/ref.mail.php
http://master.php.net/manage/user-notes.php?action=edit+25627
http://master.php.net/manage/user-notes.php?action=delete+25627
http://master.php.net/manage/user-notes.php?action=reject+25627