Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. PHP 5.2.14 (cli) (built: Jul 27 2010 10:49:36)
  2. Copyright (c) 1997-2010 The PHP Group
  3. Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  4.  
  5. require("PHPMailer_5.2.1/class.phpmailer.php");
  6.  
  7. $mail = new PHPMailer();
  8.  
  9. $mail->IsSMTP();
  10. $mail->Mailer = "smtp";
  11. $mail->Host = "ssl://smtp.live.com";
  12. $mail->Port = 587;
  13. $mail->SMTPAuth = true;
  14. $mail->Username = "some_email@hotmail.nl";
  15. $mail->Password = "password";
  16.  
  17. $mail->From = "some_email@hotmail.nl";
  18. $mail->AddAddress("some_other_email@hotmail.nl");
  19.  
  20. $mail->Subject = "Subject";
  21. $mail->Body = "Hi!";
  22.  
  23. if(!$mail->Send()) {
  24. echo 'Message was not sent.';
  25. echo 'Mailer error: ' . $mail->ErrorInfo;
  26. } else {
  27. echo 'Message has been sent.';
  28.  
  29. Message was not sent.Mailer error: The following From address failed: some_email@hotmail.nl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement