Guest User

Untitled

a guest
Apr 25th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.93 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL ^ E_NOTICE);
  3. ini_set("memory_limit", "64M");
  4.  
  5.  
  6.     $fisier_smtps = file("smtps.txt");
  7.     $limit = 0;
  8.     foreach($fisier_smtps as $linie => $valoare)
  9.    
  10.     {
  11.     print $valoare;
  12.  
  13.         $cont = explode(":",$cont[0]);
  14.         $parola = explode(":",$parola[1]);
  15.     }
  16.    
  17.     $server = "smtp.mail.yahoo.com";
  18.     $port = "995";
  19.  
  20.  $headers = array ('From' => $from,
  21.    'To' => $to,
  22.    'Subject' => $subiect);
  23.  $smtp = Mail::factory('smtp',
  24.    array ('host' => $server,
  25.      'auth' => true,
  26.      'username' => $cont,
  27.      'password' => $parola));
  28.  
  29.     $emails = file("emails.txt");
  30. $emails_trimise = 0;
  31.     foreach($emails as $linie => $de_trimis)
  32.    
  33.     {
  34.    
  35.  $mail = $smtp->send($de_trimis, $headers, $mesaj);
  36.  
  37.  if (PEAR::isError($mail)) {
  38.    echo("<p>" . $mail->getMessage() . "</p>");
  39.   } else {
  40.    echo("<p>Message successfully sent!</p>");
  41.   }
  42.  
  43.     $emails_trimise++;
  44.  
  45.         }
  46.  
  47.     print "$mailsSent mails was sent...\n";
  48.    
  49.    
  50.  ?>
Advertisement
Add Comment
Please, Sign In to add comment