title: phpmailer exchange server authentication
body: <p>My mail send code:</p>
  
  <pre><code>    $mail = new PHPMailer(true);
      $mail-&gt;IsSMTP();
  
      try {
          $mail-&gt;Host = 192.168.205.19;
          $mail-&gt;Port = 25;
          $mail-&gt;SMTPDebug  = 2;
          $mail-&gt;SMTPSecure = "tls";
          $mail-&gt;SMTPAuth = true;
          $mail-&gt;Username = "mymailadress@mysite.com";
          $mail-&gt;Password = "mypassword";
  
          $mail-&gt;From = "mymailaddress@mysite.com";
          $mail-&gt;FromName = "My Mail Address";
          $mail-&gt;SetFrom("mymailaddress@mysite.cm", "My Mail Address");
  
          $mail-&gt;AddAddress('toaddress@mysite.com');
  
          $mail-&gt;Subject = "Test for subject";
          $mail-&gt;MsgHTML("Test my mail body");
  
          if ($mail-&gt;Send()) {
              $result = 1;
          } else {
              $result = "Error: " . $mail-&gt;ErrorInfo;
          }
      } catch (phpmailerException $e) {
          $result = $e-&gt;errorMessage();
      } catch (Exception $e) {
          $result = $e-&gt;getMessage();
      }
  
      return $result;
  </code></pre>
  
  <p>Result?</p>
  
  <pre><code>SMTP -&gt; FROM SERVER:220 evo.callpex.int Microsoft ESMTP MAIL Service ready at Tue, 27 Nov 2012 17:45:24 +0200 
  SMTP -&gt; ERROR: Password not accepted from server: 535 5.7.3 Authentication unsuccessful 
  </code></pre>
  
  <p>I'm using PHPMailer class for sent mail. And SMTP. I'm connecting to Exchange Mail server. But I have this error.</p>
  
  <p>Why?</p>
  
  <p>Thanks!</p>