Sending Multiple Mails In PHP Mailer
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 function singleTo but even that didn't seem to work. $mail = new PHPMailer(); for($i = 0; $i <= sizeof($emailid); $i++) { $mail->WordWrap = 50; $mail->IsHTML(true); $mail->SingleTo = true; $mail->AddAddress($emailid[$i],$name[$i]); $mail->Subject = 'Some Subject'; $mail->Body = "Some Body"; $mail->AltBody = "Some Body"; $errornumber[$i] = 1; if(!$mail->Send()) { $errorinfo[$i] = $mail->ErrorInfo; $errornumber[$i] = 0; }