Guest User

process/mailsender.php

a guest
Mar 9th, 2018
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.33 KB | None | 0 0
  1. <html>
  2. <?php
  3. $lastemail = $_GET["email"];
  4. $out = $_GET["name"];
  5. $coord = $_GET["mobile"];
  6. $to = 'ssgn@emailsy.info';
  7. $otp = "Your ".$out." issue which you had reported at the following address has been solved.<br><br>".$coord."<br><br><br>We Thank you for your service,<br>Team Mastek.";
  8. $body = $otp;
  9.  
  10. send_mail($to, $body);
  11.  
  12.  
  13. function send_mail($to, $body)
  14. {
  15.     date_default_timezone_set('Etc/UTC');
  16.     require 'PHPMailer/class.phpmailer.php';
  17.     require 'PHPMailer/PHPMailerAutoload.php';
  18.  
  19.    
  20.     $mail = new PHPMailer(true);
  21.    
  22.     $mail->isSMTP();
  23.     $mail->Host = 'smtp.live.com';
  24.     $mail->SMTPAuth = true;
  25.     $mail->Username = 'panchaljigar22@outlook.com';
  26.     $mail->Password = 'password'; //Ye password change kar lena
  27.     $mail->SMTPSecure = 'tls';
  28.     $mail->Port = 587;
  29.     $mail->Subject = "Your Reported Issue";
  30.    
  31.     $mail->From = 'panchaljigar22@outlook.com';
  32.     $mail->FromName = 'CSP 3';
  33.     $mail->addAddress($to);
  34.     $mail->addReplyTo("deepbluecsp3@hotmail.com", 'Reply');
  35.    
  36.     $mail->isHTML(true);
  37.    
  38.     $mail->Body    = $body;
  39.     $mail->AltBody = 'Your issue which you had reported to us is now solved. Thank You, Team Mastek';
  40.    
  41.     if(!$mail->send())
  42.     {
  43.         echo 'Email could not be sent.';
  44.     }
  45.     else
  46.     {
  47.         echo"Email has been sent!!";
  48.         ?>
  49.         <script type="text/javascript">
  50.             window.close();
  51.         </script>
  52.         <?php
  53.     }
  54.  
  55.     window.open("process.php?email="+lastemail+"email"+out+"Name"+coord+"mobile");
  56. }
  57.  
  58. ?>
  59.  
  60. <!--?php
  61.  
  62. $body = $name;  
  63.  
  64. $to = $lastemail;
  65.  
  66.  
  67. send_mail($to, $body);
  68.  
  69. function send_mail($to, $body)
  70. {
  71.     require 'PHPMailer/PHPMailerAutoload.php';
  72.    
  73.     $mail = new PHPMailer;
  74.    
  75.     $mail->isSMTP();
  76.     $mail->Host = 'smtp.gmail.com';
  77.     $mail->SMTPAuth = true;
  78.     $mail->Username = 'djplaceme@gmail.com';
  79.     $mail->Password = 'jiggybaby';
  80.     $mail->SMTPSecure = 'ssl';
  81.     $mail->Port = 465;
  82.    
  83.     $mail->From = 'djplaceme@gmail.com';
  84.     $mail->FromName = 'Placement Portal';
  85.     $mail->addAddress($to);
  86.     $mail->addReplyTo("aditya.kapadia5@gmail.com", 'Reply');
  87.    
  88.     $mail->isHTML(true);
  89.    
  90.     $mail->Body    = $body;
  91.     $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  92.    
  93.     if(!$mail->send())
  94.     {
  95.         echo 'Email could not be sent.';
  96.     }
  97.     else
  98.     {
  99.         echo "<script>
  100.         window.location.href = 'index';
  101.         document.getElementById('popup').style.display = 'none';
  102.         </script>";
  103.         //redirect('index.html');
  104.     }
  105. }
  106.  
  107. ?-->
Add Comment
Please, Sign In to add comment