Get sendmail
Download and extract Fake sendmail (http://glob.com.au/sendmail/).I have chosen path c:\sendmail
Configure sendmail
Configure sendmail by editing sendmail.ini. Simply add exchange address and user credentials (Don't forget to limit read permissions):smtp_server=exchange_server_name auth_username=domain_user (full format: DOMAIN\user) auth_password=pass
Configure PHP
Configure PHP by editing php.ini file:[mail function] ; For Win32 only. ; http://php.net/smtp ;SMTP = localhost ; http://php.net/smtp-port ;smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path sendmail_path = "c:\sendmail\sendmail.exe -t"
Test it
Thats all. Now PHP sends emails through local sendmail and exchage server. You can test it using script like:<?php mail('recipient@example.com', 'subject', 'message', 'From: sender@example.com');