Given that my iPhone seems to be able to connect to Google Apps mail (ie: gmail, but with my own domain name) and use the calendar and contacts, I presumed that I'd be able to connect programmatically with Exchange Web Services. I assume the iPhone just treats gmail like an Exchange server, but the presence of the Google Apps Sync when using Outlook on the desktop to connect to gmail makes me wonder.
The short version of my question is: can I use EWS to connect to gmail and access my contacts and calendars (as well as email)?
My very first test of this assumption fails with it unable to autodiscover the configuration:
ExchangeService service = new ExchangeService();
service.AutodiscoverUrl("[email protected]");
EmailMessage message = new EmailMessage(service);
message.Subject = "Subject";
message.Body = "Body";
message.ToRecipients.Add("[email protected]");
message.Save();
message.SendAndSaveCopy();
My goal is to support a broader set of email beyond IMAP, and was hoping that EWS would extend my reach not just to Exchange servers but to gmail as well.
Thanks! Dave