title: PHPMailer SERVER -> CLIENT: 550 5.7.1 Unable to relay
body: <p>I have a problem to send mail with phpmailer and microsoft exchange.</p>
  
  <p>here is my code :</p>
  
  <pre><code>$mail = new PHPMailer();
  $mail-&gt;isSMTP();
  $mail-&gt;Host = 'mail.myhost.com';
  $mail-&gt;SMTPDebug  = 2;
  $mail-&gt;Username   = "myUsername";
  $mail-&gt;Password   = "myPassword";
  $mail-&gt;From = "from@server.com";
  $mail-&gt;AddAddress("some.address@gmail.com");
  $mail-&gt;Subject = "Test";
  $mail-&gt;Body = 'Test';
  $mail-&gt;send();
  </code></pre>
  
  <p>and i obtain this message :</p>
  
  <pre><code>2014-06-04 13:34:49 SERVER -&gt; CLIENT: 220 SRV-******.***.local Microsoft ESMTP MAIL Service ready at Wed, 4 Jun 2014 15:38:20 +0200 
  2014-06-04 13:34:49 CLIENT -&gt; SERVER: EHLO myhost.com
  2014-06-04 13:34:49 SERVER -&gt; CLIENT: 250-SRV-******.***.local  Hello [87.254.99.10] 250-SIZE 99999744 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-X-ANONYMOUSTLS 250-AUTH 250-X-EXPS NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250-XEXCH50 250 XSHADOW 
  2014-06-04 13:34:49 CLIENT -&gt; SERVER: MAIL FROM: 
  2014-06-04 13:34:49 SERVER -&gt; CLIENT: 250 2.1.0 Sender OK 
  2014-06-04 13:34:49 CLIENT -&gt; SERVER: RCPT TO: 
  2014-06-04 13:34:54 SERVER -&gt; CLIENT: 550 5.7.1 Unable to relay 
  2014-06-04 13:34:54 SMTP ERROR: RCPT TO command failed: 550 5.7.1 Unable to relay 
  2014-06-04 13:34:54 CLIENT -&gt; SERVER: QUIT 
  2014-06-04 13:34:54 SERVER -&gt; CLIENT: 221 2.0.0 Service closing transmission channel SMTP Error: The following recipients failed: some.address@gmail.com 
  </code></pre>
  
  <p>My "from" and "to" mail adress are missing ...</p>
  
  <p>Is someone know what is the problem ?</p>