I have been writing a trigger that mails an email using PHP mailer. The problem with the code is that it is sending multiple mails to a single recipient. I even tried using the
I am using almost same script, but I also set this:
while(...)
{
$mail = new PHPMailer(); //reset class instance to new one
.....
$mail->From = $fromAddress;
$mail->FromName = $fromAddress;
$mail->AddAddress($toAdress);
....
}