Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1.         while ($rij = mysql_fetch_array($result))
  2.  
  3.         {
  4.  
  5.             $to = $rij[0];
  6.             //$to ="test@gmail.com";
  7.            
  8.  
  9.             if ($rij[1] != NULL) $to .= ", $rij[1]";
  10.  
  11.             $mailResult = $mail_queue->put($from, $to, $hdrs, $body);
  12.             $mail_queue->sendMailsInQueue(50);
  13.             //var_dump($mailResult);
  14.  
  15.             if(!PEAR::isError($mailResult)) {
  16.  
  17.                 $m++;
  18.  
  19.             } else {
  20.  
  21.                 $n++;
  22.  
  23.                 print "Mail niet verstuurd naar ".$to."! " . $mailResult->getMessage() . "<br>";
  24.  
  25.             }
  26.  
  27.         }
  28.        
  29.         //print 'testing..';
  30.         //exit;
  31.         print "<br>".$m." mails verstuurd<br>".$n." mails niet verstuurd";
  32.  
  33.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement