Guest User

Untitled

a guest
Mar 9th, 2018
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ERROR);
  3. include_once('class.phpmailer.php');
  4. $mail = new PHPMailer();
  5. $mail->IsSMTP();
  6. $mail->SMTPDebug = 1; // 1 tells it to display SMTP errors and messages, 0 turns off all errors and messages, 2 prints messages only.
  7. $mail->SMTPAuth = true;
  8. //$mail->SMTPSecure = "ssl";
  9. $mail->Host = "smtpout.secureserver.net";
  10. $mail->Port = 80;
  11.  
  12. $mail->Username = "fromemailhere";
  13. $mail->Password = "passwordhere";
  14.  
  15. $mail->From = "fromemailhere";
  16. $mail->FromName = "Mike Henken";
  17. $mail->AddAddress("mikehenken@gmail.com", "Mike Henken");
  18. $mail->Subject = "Your Login Information";
  19. $mail->Body = "Put body of message HERE.";
  20.  
  21. if ($mail->Send() == true) {
  22. echo "The message has been sent";
  23. }
  24. else {
  25. echo "
  26.  
  27. The email message has NOT been sent for some reason. Please try again later.
  28.  
  29. ";
  30. echo "Mailer error: " . $mail->ErrorInfo;
  31. }
  32.  
  33. ?>
Add Comment
Please, Sign In to add comment