Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. if(!class_exists('PHPMailer')) {
  3. require('PHPMailer/_lib/class.phpmailer.php');
  4. }
  5.  
  6. $mail = new PHPMailer();
  7.  
  8. $emailBody = "<div>" . $user["Name"] . ",<br><br><p>These are your User Data:<br>". $user["Name"] . $user["password"] . "<br><br></p>Regards,<br> Admin.</div>";
  9.  
  10. $mail->IsSMTP();
  11. $mail->SMTPDebug = 0;
  12. $mail->SMTPAuth = TRUE;
  13. $mail->SMTPSecure = "tls";
  14. $mail->Port = 587;
  15. $mail->Username = "Maria Papa";
  16. $mail->Password = "@PaPaDaKi070695@";
  17. $mail->Host = "smtp.gmail.com";
  18. $mail->Mailer = "smtp";
  19.  
  20. $mail->From = "MariaGPap95@gmail.com";
  21. $mail->FromName = "Maria Papa";
  22. $mail->AddReplyTo("MariaGPap95@gmail.com", "PHPPot");
  23. $mail->ReturnPath="MariaGPap95@gmail.com";
  24. $mail->AddAddress("mary_lee@hotmail.gr");
  25. $mail->Subject = "Forgot Password Recovery";
  26. $mail->WordWrap = 80;
  27. $mail->MsgHTML($emailBody);
  28. $mail->IsHTML(true);
  29.  
  30. if(!$mail->Send()) {
  31. $error_message = 'Problem in Sending Password Recovery Email';
  32. } else {
  33. $success_message = 'Please check your email to reset password!';
  34. }
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement