2

I have an app using the EWS API. Some computers using Exchange 2003 and some use 2007/2010. Initially, in my app I just used:

ExchangeService service = new ExchangeService();
service.UseDefaultCredentials = true;
service.AutodiscoverUrl(url);

But I found out quickly that that fails on the computers using 2003, with the error: "Client mailboxes must be on Exchange Server 2010 or later". So I changed my code to (obviously removed the actual address to the Exchange server):

ExchangeService service = new ExchangeService();
service.UseDefaultCredentials = true;
service.Url = new Uri("https://.....");

Now I get the error: "The mailbox that was requested doesn't support the specified RequestServerVersion.".

So, I think I understand why this is happening and really just seems like I have to do something completely different to get this working on 2003. Except short of using the Net.Mail api instead, I'm not sure exactly how to do it. Can I still use the EWS API and if so, what do I need to change to allow it to work on both?

Kurt
  • 1,868
  • 3
  • 21
  • 42
  • EWS was introduced with Exchange 2007 so I will not work with 2003. I think you have to tell us what you are trying to accomplish before we can advice you on which API to use. – Jakob Christensen Apr 29 '12 at 17:46
  • I want to be able to send an email from this app. Some computers here use Exchange 2007, some use 2003. I've gotten it working with 2007. To get it to work with 2003, should I just use the Net.Mail api or is there another/better way of doing it? – Kurt May 23 '12 at 21:55

1 Answers1

1

Exchange 2003(2000?) uses different API, which is completely different from EWS. Exchange 2007 supports both API.

You can use CDO How do I use CDO with Exchange with vbscript

or WebDAV Access Your Exchange 2000 / 2003 Mailbox With WebDAV.

Note
I think its better to use New ExchangeService(ExchangeVersion.Exchange2007_SP1), then you are sure that it is working with 2007 and use backward compatibility on 2010.

Community
  • 1
  • 1
IvanH
  • 5,039
  • 14
  • 60
  • 81