Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. require("libphp-phpmailer/class.phpmailer.php");
  2.  
  3. $mail = new PHPMailer();
  4. $mail->IsSMTP();
  5. $mail->SMTPAuth = true;
  6. $mail->SMTPSecure = "tls";
  7. $mail->Host = "smtp.gmail.com"; // change to your email host
  8. $mail->Port = 587; // change to your email port
  9.  
  10. $mail->Username = "vasyapupkinkram123@gmail.com"; // change to your username
  11. $mail->Password = "123"; // change to your email password
  12. $mail->setFrom("vasyapupkinkram123@gmail.com"); // change to your email password
  13.  
  14. $mail->AddAddress("ponomarovmax@gmail.com"); // change to user's email address
  15.  
  16. $mail->Subject = "trial"; // change to email's subject
  17. $mail->Body = "<h1>hello, world!</h1>"; // change to email's body, add the needed link here
  18.  
  19. if ($mail->Send() == false)
  20. {
  21. die($mail->ErrInfo);
  22. }
  23. else
  24. {
  25. echo "It worked!\n";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement