Please verify and follow the steps below to make sure things are configured properly to connect to Exchange 2013.
1. Please ensure that you are using MAPI & CDO version 08.03.0.8353.000 or newer you can find it here:
http://www.microsoft.com/en-us/download/details.aspx?id=42040
2. Please verify that you have the Internal Outlook Anywhere SSL Certificate Installed on the MessageStats server by going to the properties of Internet Explorer and clicking on Content then Certificates and select Other People and you should see your Exchange 2013 CAS certificate. If you do not please install the certificate and make sure it is installed under the MessageStats service account.. If you have issues installing the certificate please upgrade your Internet Explorer browser or reset Internet Explorer.
If you are running MessageStats 7.3 or newer and everything above has checked out please do the following.
1. Open a command prompt, and change it to the MessageStats installation directory and run the following command as Administrator:
2. MapCASName.exe /a gdcpwcas01 mail.samplename.com
Where gdcpwcas01 is the MessageStats connection server and mail.samplename.com is the name that is included in your certificate that can be used for a MAPI connection with NTLM authentication. (The Outlook Anywhere Address) Make sure this address is resolveable and there are no typo's.
If the server requires Basic authentication, add the prefix basic: like basic:mail.samplename.com. If you have multiple CAS servers, run the utility to add each CAS server.
If everything above has been completed and you are getting the error "Failed to get the required attribute 'mail' from the user object." verify below.
When selecting the Logon Mailbox in the Connection Server properties please use the SMTP address of the service account mailbox. Example: username@companydomain.com not the Domain\Username prefix when connecting to the Exchange 2013 Logon Mailbox.
If all else still fails. Check the MessageStats host file and make sure there are no entries in it for any of the client access servers or the outlook anywhere address.