Hi all,
I am testing with the PHPMailer class, I have my email 150 times in my database and the following code
// Send the emails in this loop.
$name = $row_rsMailUsers->name;
$email = $row_rsMailUsers->email;
if($row_rsMailUsers->MailType == 'html')
{
$mailer->Body = str_replace('{MEMBER_NAME}', $name, $htmlBody);
$mailer->IsHTML(true);
$mailer->AltBody = str_replace('{MEMBER_NAME}', $name, $textBody);
$mailer->AddAddress($email, $name );
}
else
{
$mailer->Body = str_replace('{MEMBER_NAME}', $name, $textBody);
$mailer->isHTML(false);
$mailer->AddAddress($email, $name );
}
$mailer->Subject = "Testing";
$mailer->From = "info@mysite.com";
$mailer->FromName = "Me testing";
$mailer->IsSMTP(); // telling the class to use SMTP
$mailer->Host = "smtp.mysite.com"; // SMTP server */
if(!$mailer->Send())
{
echo "There was an error sending the message";
exit;
}
echo "Message was sent successfully";
echo "Mail sent to: ".$row_rsMailUsers->name."<br />";
$mailer->ClearAddresses();
$mailer->ClearAttachments();
And I find it very slow?
Anyway to speed this up?
Has PHPMailer an maximum number of emails to send to?