Advertisement
Guest User

Untitled

a guest
Apr 10th, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. $mail = new PHPMailer;
  2. $mail->isSMTP();
  3. $mail->Host = 'smtp.gmail.com';
  4. $mail->Port = '587';
  5. $mail->SMTPDebug = 1;
  6. $mail->SMTPSecure = 'tls';
  7. $mail->SMTPAuth = true;
  8. $mail->Username = 'facefinder2@gmail.com';
  9. $mail->Password = '************';
  10. $mail->SetFrom("facefinder2@gmail.com");
  11. //$mail->FromName = "FaceFinder";
  12.  
  13. $mail->addAddress($receiver, $name);
  14.  
  15. $mail->isHTML(true);
  16. $mail->Subject = $subject;
  17. $mail->Body = $body;
  18. $mail->AltBody = $plain_body;
  19.  
  20. if(!$mail->send()) {
  21. //return false;
  22. echo "Mailer Error: " . $mail->ErrorInfo; die();
  23. } else {
  24. return true;
  25. //echo "Message has been sent successfully";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement