title: problems sending email to SMTP with PHPMailer
body: <p>I get the following error log when trying to send a message through an Exchange server:</p>
  
  <pre><code>SMTP -&gt; get_lines(): $data was "" 
  SMTP -&gt; get_lines(): $str is "220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400 " 
  SMTP -&gt; get_lines(): $data is "220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400 " 
  SMTP -&gt; FROM SERVER: 220 mail.borschow.com Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Tue, 7 Apr 2009 21:56:53 -0400 
  SMTP -&gt; get_lines(): $data was "" 
  SMTP -&gt; get_lines(): $str is "250-mail.borschow.com Hello [10.0.254.231] " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] " 
  SMTP -&gt; get_lines(): $str is "250-TURN " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN " 
  SMTP -&gt; get_lines(): $str is "250-SIZE " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE " 
  SMTP -&gt; get_lines(): $str is "250-ETRN " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN " 
  SMTP -&gt; get_lines(): $str is "250-PIPELINING " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING " 
  SMTP -&gt; get_lines(): $str is "250-DSN " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN " 
  SMTP -&gt; get_lines(): $str is "250-ENHANCEDSTATUSCODES " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES " 
  SMTP -&gt; get_lines(): $str is "250-8bitmime " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime " 
  SMTP -&gt; get_lines(): $str is "250-BINARYMIME " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME " 
  SMTP -&gt; get_lines(): $str is "250-CHUNKING " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING " 
  SMTP -&gt; get_lines(): $str is "250-VRFY " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY " 
  SMTP -&gt; get_lines(): $str is "250-X-LINK2STATE " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE " 
  SMTP -&gt; get_lines(): $str is "250-XEXCH50 " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 " 
  SMTP -&gt; get_lines(): $data was "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 " 
  SMTP -&gt; get_lines(): $str is "250 OK " 
  SMTP -&gt; get_lines(): $data is "250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 250 OK " 
  SMTP -&gt; FROM SERVER: 250-mail.borschow.com Hello [10.0.254.231] 250-TURN 250-SIZE 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250-X-LINK2STATE 250-XEXCH50 250 OK 
  SMTP -&gt; get_lines(): $data was "" 
  SMTP -&gt; get_lines(): $str is "504 5.7.4 Unrecognized authentication type. " 
  SMTP -&gt; get_lines(): $data is "504 5.7.4 Unrecognized authentication type. " 
  SMTP -&gt; ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type. 
  SMTP -&gt; get_lines(): $data was "" 
  SMTP -&gt; get_lines(): $str is "250 2.0.0 Resetting " 
  SMTP -&gt; get_lines(): $data is "250 2.0.0 Resetting " 
  SMTP -&gt; FROM SERVER: 250 2.0.0 Resetting 
  </code></pre>
  
  <h2>Notes</h2>
  
  <ul>
  <li>I've tried with my assigned user/password, but the administrator said there's not even a need to use a user/password when sending.  So I also tried without it, with no success.</li>
  <li>I even tried with <strong>smtp.gmail.com</strong></li>
  </ul>
  
  <h2>UPDATE (4/16/2009)</h2>
  
  <p>ok, I found my problem.</p>
  
  <p>I am using an SMTP server that permits sending messages without authentication.  Therefore I removed the login and password from my code.  But I forgot to set the "uses authentication" flag to false.  Now it's working.</p>
  
  <p>Thanks for the Help!</p>