Advertisement
Guest User

Untitled

a guest
Nov 12th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2. require 'loader/PHPMailerAutoload.php';
  3.  
  4. $mail = new PHPMailer(); // create a new object
  5. $mail->IsSMTP(); // enable SMTP
  6. $mail->SMTPDebug = 2; // debugging: 1 = errors and messages, 2 = messages only
  7. $mail->SMTPAuth = true; // authentication enabled
  8. $mail->SMTPSecure = 'tls'; // seure transfer enabled REQUIRED for GMail
  9. $mail->Host = "smtp.gmail.com";
  10. $mail->Port = 587; // or 587 or 465
  11. $mail->IsHTML(true);
  12. $mail->Username = "varetti.cupitor@gmail.com";
  13. $mail->Password = "########";
  14. $mail->SetFrom("varetti.cupitor@gmail.com");
  15. $mail->Subject = "Your Digital Download is available";
  16. $mail->Body = "https://dl.dropboxusercontent.com/u/26430460/1_OGTango_Videos/Tango%20Secrets%201.zip";
  17. $mail->AddAddress($_POST['email']);
  18.  
  19. if(!$mail->Send())
  20. {
  21. echo "Mailer Error: " . $mail->ErrorInfo;
  22. }
  23. else
  24. {
  25. echo "Message has been sent";
  26. header("Location: http://www.tangodebuenosaires.com/email_thankyou.html");
  27. }
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement