Saturday, October 25, 2008

Getting Windows Mobile to Work with Exchange 2007 Using POP3/IMAP4 and SMTP (Part 2)

This is part 2 of my series, where I show you how to configure Windows Mobile to send and receive email from Exchange 2007 using IMAP4 and SMTP.
Part 1, where we configured Exchange 2007, can be read here.

Now that Exchange 2007 is configured, we need to configure a new email account in Windows Mobile. How you do this depends on the version of Windows Mobile on your device, but the essential steps are as follows:
  • Enter your email address and password to access the new account
  • Select Internet e-mail from the dropdown box for Your e-mail provider
  • Enter your name as you want it to appear to recipients and choose an account display name on the device (i.e., IMAP Email)
  • Enter the FQDN for the Exchange 2007 server that holds the Client Access (CAS) role (i.e., cas.mydomain.com) for the Incoming mail server.
  • Choose IMAP4 as the Account Type
  • Enter your account logon (domain\username) for the User Name and enter the network password
  • Enter the FQDN for the Exchange 2007 server that holds the Hub Transport role, followed by :587 (i.e., smtp.mydomain.com:587) for the Outgoing (SMTP) mail server. See the figure above. If you don't follow the FQDN with :587, the Windows Mobile device will use the standard port 25 for SMTP communication.
  • Select Outgoing server requires authentication
  • Under Advanced Settings, select both the Require SSL for Incoming e-mail and Require SSL for Outgoing e-mail checkboxes to encrypt the traffic between the Windows Mobile device and Exchange 2007
  • Configure your Automatic Send/Receive schedule
Important Note: You must enter the FQDN:587 correctly the first time for the Outgoing (SMTP) mail server field. You cannot edit it later once you've clicked off that field -- if you do, Windows Mobile will still use port 25. This seems to be a bug in Windows Mobile 6.1 and may happen in other versions, as well. If you don't enter it correctly the first time, you will either need to cancel the setup wizard and start over again or delete the email account and recreate it.
Now test your new settings by synchronizing the mail account and test sending
an email. If you get an error saying,
Message not sent. The message 'Test email' was not sent and has been moved to the Drafts folder. The server returned the following error message:
550 5.7.1 Unable to relay
It means that the Windows mobile device is trying to send SMTP email over port 25 through your Exchange server to a remote address, which is relaying. Delete the account you just created and do it again, making sure to enter :587 after the FQDN of the SMTP server.
I hope this two-part series helps you get IMAP and SMTP working properly between Exchange 2007 and your Windows Mobile device! 11:33 AM