title: PHPMAILER mail sent but not received
body: <p>I am trying to use PHPMailer but I'm having problem. This is my test code: </p>
  
  <pre><code>&lt;?php
  
  require './PHPMailer/PHPMailerAutoload.php';
  
  $mail = new PHPMailer;
  
  $mail-&gt;isSMTP();
  
  $mail-&gt;SMTPDebug = 4;
  
  $mail-&gt;Debugoutput = 'html';
  
  $mail-&gt;Host = "localhost";
  //Set the SMTP port number - likely to be 25, 465 or 587
  $mail-&gt;Port = 25;
  
  $mail-&gt;SMTPAuth = true;
  
  $mail-&gt;Username = "donotreply@myservermail";
  
  $mail-&gt;Password = "mypassword";
  
  $mail-&gt;setFrom('donotreply@myservermail', 'Mail test');
  
  $mail-&gt;addReplyTo('myemail@live.com', 'First Last');
  
  $mail-&gt;addAddress('donotreply@myservermail', 'Test mail');
  
  $mail-&gt;Subject = 'PHPMailer SMTP test';
  
  
  $mail-&gt;msg = 'Hello there this is a test . ';
  
  $mail-&gt;Body = 'This is a plain-text message body';
  
  if (!$mail-&gt;send()) {
      echo "Mailer Error: " . $mail-&gt;ErrorInfo;
  } else {
      echo "Message sent!";
  }
  
  ?&gt;
  </code></pre>
  
  <p>And here is the result from browser, and I see no error there:</p>
  
  <pre><code>Connection: opening to localhost:25, timeout=300, options=array ()
  Connection: opened
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "220 localhost ESMTP"
  SMTP -&gt; get_lines(): $data is "220 localhost ESMTP"
  SERVER -&gt; CLIENT: 220 localhost ESMTP
  CLIENT -&gt; SERVER: EHLO MY_SERVER_NAME
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "250-localhost"
  SMTP -&gt; get_lines(): $data is "250-localhost"
  SMTP -&gt; get_lines(): $data was "250-localhost"
  SMTP -&gt; get_lines(): $str is "250-SIZE 20480000"
  SMTP -&gt; get_lines(): $data is "250-localhost250-SIZE 20480000"
  SMTP -&gt; get_lines(): $data was "250-localhost250-SIZE 20480000"
  SMTP -&gt; get_lines(): $str is "250-AUTH LOGIN"
  SMTP -&gt; get_lines(): $data is "250-localhost250-SIZE 20480000250-AUTH LOGIN"
  SMTP -&gt; get_lines(): $data was "250-localhost250-SIZE 20480000250-AUTH LOGIN"
  SMTP -&gt; get_lines(): $str is "250 HELP"
  SMTP -&gt; get_lines(): $data is "250-localhost250-SIZE 20480000250-AUTH LOGIN250 HELP"
  SERVER -&gt; CLIENT: 250-localhost250-SIZE 20480000250-AUTH LOGIN250 HELP
  Auth method requested: UNKNOWN
  Auth methods available on the server: LOGIN
  Auth method selected: LOGIN
  CLIENT -&gt; SERVER: AUTH LOGIN
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "334 SOME_ENCRYPTED_STRING"
  SMTP -&gt; get_lines(): $data is "334 SOME_ENCRYPTED_STRING"
  SERVER -&gt; CLIENT: 334 SOME_ENCRYPTED_STRING
  CLIENT -&gt; SERVER: SOME_ENCRYPTED_STRING
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "334 SOME_ENCRYPTED_STRING"
  SMTP -&gt; get_lines(): $data is "334 SOME_ENCRYPTED_STRING"
  SERVER -&gt; CLIENT: 334 SOME_ENCRYPTED_STRING
  CLIENT -&gt; SERVER: SOME_ENCRYPTED_STRING
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "235 authenticated."
  SMTP -&gt; get_lines(): $data is "235 authenticated."
  SERVER -&gt; CLIENT: 235 authenticated.
  CLIENT -&gt; SERVER: MAIL FROM:&lt;donotreply@MY_SERVER_MAIL&gt;
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "250 OK"
  SMTP -&gt; get_lines(): $data is "250 OK"
  SERVER -&gt; CLIENT: 250 OK
  CLIENT -&gt; SERVER: RCPT TO:&lt;MY_EMAIL@yahoo.com&gt;
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "250 OK"
  SMTP -&gt; get_lines(): $data is "250 OK"
  SERVER -&gt; CLIENT: 250 OK
  CLIENT -&gt; SERVER: DATA
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "354 OK, send."
  SMTP -&gt; get_lines(): $data is "354 OK, send."
  SERVER -&gt; CLIENT: 354 OK, send.
  CLIENT -&gt; SERVER: Date: Thu, 14 May 2015 10:40:00 +0200
  CLIENT -&gt; SERVER: To: MY_EMAIL yahoo &lt;MY_EMAIL@yahoo.com&gt;
  CLIENT -&gt; SERVER: From: MAIL_SERVER test &lt;donotreply@MY_SERVER_MAIL&gt;
  CLIENT -&gt; SERVER: Reply-To: MY_EMAIL Live &lt;MY_EMAIL@live.com&gt;
  CLIENT -&gt; SERVER: Subject: PHPMailer SMTP test
  CLIENT -&gt; SERVER: Message-ID: &lt;SOME_ENCRYPED_STRING@MY_SERVER_NAME&gt;
  CLIENT -&gt; SERVER: X-Priority: 3
  CLIENT -&gt; SERVER: X-Mailer: PHPMailer 5.2.10 (https://github.com/PHPMailer/PHPMailer/)
  CLIENT -&gt; SERVER: MIME-Version: 1.0
  CLIENT -&gt; SERVER: Content-Type: text/plain; charset=iso-8859-1
  CLIENT -&gt; SERVER: Content-Transfer-Encoding: 8bit
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: This is a plain-text message body
  CLIENT -&gt; SERVER:
  CLIENT -&gt; SERVER: .
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "250 Queued (0.000 seconds)"
  SMTP -&gt; get_lines(): $data is "250 Queued (0.000 seconds)"
  SERVER -&gt; CLIENT: 250 Queued (0.000 seconds)
  CLIENT -&gt; SERVER: QUIT
  SMTP -&gt; get_lines(): $data was ""
  SMTP -&gt; get_lines(): $str is "221 goodbye"
  SMTP -&gt; get_lines(): $data is "221 goodbye"
  SERVER -&gt; CLIENT: 221 goodbye
  Connection: closed
  Message sent!
  </code></pre>
  
  <p>I've tried this test with different emails, on yahoo, gmail, etc, but still the same. I also checked carefully the spam for all my emails, for couple hours.<br>
  Any idea?</p>