[text] Code

Viewer

  1. <?php
  2. // Load Secure PHPMailer
  3. require '../PHPMailer-master/src/Exception.php';
  4. require '../PHPMailer-master/src/PHPMailer.php';
  5. require '../PHPMailer-master/src/SMTP.php';
  6. require '../PHPMailer-master/src/OAuth.php';
  7. // Instantiate class and provide invariants
  8. $mail = new PHPMailer\PHPMailer\PHPMailer();
  9. $mail->IsSMTP();                                // send via SMTP
  10. $mail->Host    = "mail.papamail.net"; // SMTP servers
  11. $mail->SMTPAuth = true;    // turn on SMTP authentication
  12. $mail->Username = "[email protected]";  // SMTP username
  13. $mail->Password = "*************"; // SMTP password ("*****" is replaced by
  14. the correct password)
  15. $mail->From    = "[email protected]";
  16.  
  17. $garage_name = $_GET['garage_name'];
  18. $email_to =  $_GET['email_to'];
  19. $email_subject = $_GET['email_subject'];
  20. $email_body = $_GET['email_body'];
  21. // Send Secure Email
  22. $mail->IsHTML(true);
  23. $mail->FromName = $garage_name;
  24. $mail->AddAddress($email_to);
  25. $mail->Subject = $email_subject;
  26. $mail->Body    = $email_body;
  27. $mail->send();
  28. echo "Sent!";
  29. ?>
  30.  

Editor

You can edit this paste and save as new:


File Description
  • Code
  • Paste Code
  • 27 Feb-2021
  • 1.05 Kb
You can Share it: