Advertisement
Guest User

Untitled

a guest
Oct 10th, 2016
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. require_once 'lib/phpmailer/PHPMailerAutoload.php';
  2.  
  3. $m = new PHPMailer;
  4.  
  5. $m->isSMTP();
  6. $m->SMTPAuth = true;
  7. $m->SMTPDebug = 2;
  8.  
  9. $m->Host = 'smtp.zoho.com';
  10. $m->Username = 'email@email.com';
  11. $m->Password = 'password';
  12. $m->SMTPSecure = 'ssl';
  13. $m->Port = 465;
  14.  
  15. $m->From = 'email@email.com';
  16. $m->FromName = 'Name';
  17.  
  18. $m->Subject = 'Testing PHPMailer';
  19. $m->Body = 'Body of the email. Testing PHPMailer.';
  20.  
  21. if (!$m->send()) {
  22. echo 'Mailer Error: ' . $m->ErrorInfo;
  23. } else {
  24. echo 'Everything OK.';
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement