oop - Sending Multiple Mails In PHP Mailer -


i have been writing trigger mails email using php mailer. problem code is sending multiple mails single recipient. tried using function singleto didn't seem 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;     } } 

i using same script, set this:

while(...) {   $mail = new phpmailer(); //reset class instance new 1   .....   $mail->from = $fromaddress;      $mail->fromname = $fromaddress;   $mail->addaddress($toadress);   .... } 

.... - same code have


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -