It seems to be ccing each email to everyone and I'd like it to only include
one email address with each email. I've tested in on three of my personal
emails and I see to get six messages in my inbox.
I'm also sending about 4000 emails and would like some pointers to avoid
time out errors.
while($row = mysqli_fetch_assoc($result))
{
extract($row);
$mail-IsSMTP();
$mail-Host = host.com;
$mail-From = [EMAIL PROTECTED];
$mail-From = [EMAIL PROTECTED];
$mail-FromName = Company;
$mail-AddAddress($email, $Contact);
$mail-IsHTML(True);
Stephen Sunderlin wrote:
It seems to be ccing each email to everyone and I'd like it to only include
one email address with each email. I've tested in on three of my personal
emails and I see to get six messages in my inbox.
I'm also sending about 4000 emails and would like some pointers to
You're re-using the same message each time around the loop. Each time
you call AddAddress you're, erm, adding another address. You either need
to reset the recipients or reset the message each time round the loop
(I'm not familiar with Phpmailer so I have no idea how to do this).
-Stut
Stut and Instruct
Just found this which clears the email after each loop.
$mail-ClearAddresses();
Thanks for you input.
Good find. Now the list can benefit.
_
Climb to the top of the charts! Play Star Shuffle: the word