Mass-mailing method
| From: | Cesar Aracena | Date: | Fri, 03 Jan 2003 06:08:12 +0000 |
| Subject: | Mass-mailing method | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-130051@lists.php.net to get a copy of this message | ||
Hi all,
I did a registration page for a customer, and now I'm trying to develop
a way for him to send an e-mail once in a while to the people registered
with him. I did something (shown below) and everything seems to be ok,
but the e-mail never reaches... Can someone find the problem or maybe
point me to something already done to send multiple e-mails as BCC???
Thanks in advance,
$query = "SELECT * FROM mararegistro2 ORDER BY lname";
$result = mysql_query($query) or die (mysql_errno());
$num_rows = mysql_num_rows($result);
for ($x=0; $x < $num_rows; $x++)
{
$row = mysql_fetch_array($result);
$bcc .= $row[email]."; ";
}
$myname = "".$name."";
$myemail = "".$email."";
$contactemail = $bcc;
$message = "".$mes."";
$subject = "".$subject."";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$myname." <".$myemail.">\r\n";
$headers .= "Bcc: ".$contactemail."\r\n";
$headers .= "Reply-To: ".$myname." <".$myemail.">\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Joyeria Mara";
$mail = mail("", $subject, $message, $headers);
Cesar L. Aracena
icaam@icaam.com.ar
caracena@infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina