Guest User

Untitled

a guest
Jul 8th, 2018
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(E_ALL); //report everything
  4. //error_reporting(E_STRICT); //report critical
  5.  
  6. include("vendor/phpmailer/class.phpmailer.php");
  7. //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
  8.  
  9. $mail = new PHPMailer();
  10.  
  11. $mail->IsSMTP();
  12. $mail->SMTPAuth = true; // enable SMTP authentication
  13. $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
  14. $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
  15. $mail->Port = 465; // set the SMTP port for the GMAIL server
  16.  
  17. $mail->Username = "catsdrama2009@gmail.com"; // GMAIL username
  18. $mail->Password = "flowers1"; // GMAIL password
  19.  
  20. $mail->AddReplyTo("catsdrama2009@gmail.com", "CatsDrama.com");
  21.  
  22. $mail->From = "catsdrama2009@gmail.com";
  23. $mail->FromName = "CatsDrama.com";
  24.  
  25. $mail->Subject = "CatsDrama.com Audition";
  26.  
  27. $mail->Body = "Hi,<br>This is the HTML BODY<br>"; //HTML Body
  28.  
  29. $mail->AddAddress("tom@fizzz.com", "Tom");
  30.  
  31. $mail->IsHTML(true); // send as HTML
  32.  
  33. if(!$mail->Send()) {
  34. echo "Mailer Error: " . $mail->ErrorInfo;
  35. } else {
  36. echo "Message sent!";
  37. }
  38.  
  39. ?>
Add Comment
Please, Sign In to add comment