I realize this is a really old post, but I figured I'd reply since I was having the same problem but got it fixed, in case anyone searches again for this. I'm using M. Lemos's class and finally got it to send to multiple people. Here's what I did:
I had to add the brackets that were not in his script so that I could do the loop. Above this is the instansiation of his class and then I loop through using one email at a time for the array of "email". His script will send to multiple people at one time if they're in an array, but the printout doesn't tell you who it went to then, it just says "Array" which wasn't good enough for me. I needed to print results for each person it went to.
Hope this helps someone.
Ryan
<?
for($i=0; $i<$email_num; $i++)
{
$email = $email_array[$i];
if($smtp->SendMessage(
$from, array($email),
array(
"From: $from",
"To: $email",
"Subject: ITS Free Seminar Evaluation for $row[SEMINARNAME]",
"Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z"),
"Mime-Version: 1.0\r\nContent-type: text/html\r\n"
),
$email_content))
{
echo "<span style=\"font: 14px sans-serif; color: #000099\">The following email was sent to <b>$email</b></span>.<br><br>";
echo $email_content;
echo "<hr width=\"100%\ align=\"left\"><br><br>";}
else
{
echo "Cound not send the message to $to.\nError: ".$smtp->error."\n";
}
}
?>