title: Using HTML Mime Mail for PHP to send email, but need to authenticate through Exchange server
body: <p>First off, the server: Exchange 2003 sp2 running on Windows 2003 Server sp2</p>
  
  <p>I have a script that sends email to two email accounts, one called students@ and the other being fs@ (faculty/staff). We are setting both those email accounts to only accept incoming email by authenticated users on the exchange server, to spare ourselves from spam/junk mail. So right now the emails being sent by the script are not successful. I have the return-path email as a legit user, but it is not authenticated. I noticed that when I tried sending a test via my mail client (Apple's Mail.app) and since I use email through their IMAP server and not through exchange, my email failed as well.</p>
  
  <p>Here is the code for sending the email:</p>
  
  <pre><code>$mail = new htmlMimeMail();
  $message = $today.$announcements.$food.$upcoming;
  $mail-&gt;setHTML($message);
  $mail-&gt;setSubject($subject);
  $mail-&gt;setSMTPParams('mail.domain.com', 25, true, 'user', 'pass');
  $mail-&gt;setFrom("no-reply@domain.com");
  $mail-&gt;setReturnPath("webmaster@domain.com");
  
  if($message)
      $mailresult = $mail-&gt;send(array($emailto));
  </code></pre>
  
  <p>I have never authenticated with an exchange server using the HTML Mime Mail for PHP (<a href="http://www.phpguru.org/static/mime.mail.html" rel="nofollow noreferrer">http://www.phpguru.org/static/mime.mail.html</a>) class before. Any help would be appreciated.</p>
  
  <p>Maybe there is another PHP class that easily allows authentication with an Exchange server?</p>
  
  <p>EDIT: Are there any php mail classes out there that authenticate properly with an exchange server?</p>
  
  <p>Another EDIT: The Exchange Server uses NTLM authentication and uses Active directory. Hope this helps.</p>