Newsletter on the way..stuck in the moment!
| From: | Dhaval Desai | Date: | Fri, 06 Apr 2001 18:23:48 +0000 |
| Subject: | Newsletter on the way..stuck in the moment! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47482@lists.php.net to get a copy of this message | ||
Hi!
Well, I want to send an email to about 300 people. The
problem is that if I use this method people can see
all the email address of the people whoever it is sent
to.
<?php
$connect = mysql_connect();
$query = "select email from news";
$execute = mysql_db_query("uaegraduate", $query);
while($r = mysql_fetch_array($execute))
{
$email = $r['email'];
$add .= $email . ",";
}
$headers = "From:
Webmaster@uaegraduate.com<Webmaster@uaegraduate.com>\n";
$headers .= "Content-Type: text/html;
charset=iso-8859-1\n";
$subject = "hey";
$to = "$add";
$mailmessage = "hey this is the message";
$mailsomeone = mail($to, $subject, $mailmessage,
$headers);
if($mailsomeone)
{
echo "Success";
}
?>
If I use the above method, all the email address will
apear in the to: like this:-
To:dhaval_adams@yahoo.com,roy@joy.com,xyz@xyz.com
and goes on for 300 entries.
Is there any way I can stop this from happening yet
the mails reaching their destination.
Thank You
Cheers!~
Dhaval Desai
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/