Share via


Are you using Exchange Web Services ?

If yes then I would like to hear from you. Your experiences, challenges, things you feel are barriers and things that could make it even better. Do you need samples? What sort of operations you want to perform using Exchange Web Services?

You may ask me why I want to know all this.. well... I am developer support engineer at Microsoft. Exchange Web Services is one among the various other messaging APIs that I work upon and support. I am a big fan of Exchange Web Services and the way it has been implemented in Exchange. If I look at the future, I could see EWS being only API capable of competing and complementing MAPI.

This is NOT a official forum, but I would like to put my best efforts in helping you with all your queries related to EWS. I would take requests for HOWTO samples. If you have any questions, any doubts, migrating to Exchange 2007 and worried about your exiting applications working on WebDAV and other APIs not recommended or supported under Exchange 2007, you can ping me for help.

I would try my level best to help you.

So... start shooting.. now!

Comments

  • Anonymous
    August 10, 2008
    PingBack from http://blog.a-foton.ru/2008/08/are-you-using-exchange-web-services/

  • Anonymous
    September 22, 2008
    Hi, I'm using webservices to programattically auto-reply on incoming emails. I find it hard to understand the way how things work. Also beacause there's a lack of examples on the net. I'm trying to set up a little program that responds on a new mail event. It has to extract the attachment. handle the data in the attachment en reply with a new email with attachment. this application has to be up and running 'for ever'. any suggestions? thanx in advance greets, Rudolf

  • Anonymous
    September 22, 2008
    Rudolf, You need to use Push/Pull Notifications to receive events for every new mail that you receive. Using EWS you can call GetAttachment to download the content of attachment and parse it accordingly. Once done you can call a CreateItem and send it to the users. Read more about Notification Subsystem here http://blogs.msdn.com/vikas/archive/2007/08/28/ews-exchange-2007-notification-subsystem.aspx I have couple of samples for Notification that I will update on that blog post later today. Also I will add more links to the resources to the same blog.

  • Anonymous
    September 23, 2008
    Vikas, I think i have a solution for my problem...(But i'm still interested in yours :) ) : Using FindItemType with a restriction(message must be  unread) 'gives me' an ArrayOfRealItems with itemtypes. I can cast that itemtypes to messages so i can acces all info that i need :D I was wondering: Why are there so much examples for sending mail with EWS but less examples of (auto) receiving. I was searching the net for two days, looking for information :s Besides the (minimal) information on MSDN there was only one proper place for finding someone who can Jive with me :D Thanx!

  • Anonymous
    September 30, 2008
    Hi Vikas, I need the push notification on a public folder. Using the SDK (July 2007) I found the push notification sample for a account and it works. Well, in the SDK (SP1 August 2008) I read the information, that the push notification is now available for public folders, too. I can not find any sample how to do this. Can you please help me? Thanks Christian

  • Anonymous
    September 30, 2008
    Christian, Public folder support was included in SP1. You can treat the public folder in a similar manner as you would treat any other folder. Do a FindFolder or GetFolder to get the PF's itemId and bind the Push Notification to that. Everything else will work exactly the same. Make sure you get your proxy classes from SP1 and are passing Exchange_SP1 header in soap commands

  • Anonymous
    September 30, 2008
    Hi Vikas, thanks for your help. I got the ID from the public folder. With the following code I try to bind the Push Notification to it: .... esb.RequestServerVersionValue = new RequestServerVersion(); esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1; // Create a new subscription. SubscribeType subscribeRequest = new SubscribeType(); PushSubscriptionRequestType pushSubscription = new PushSubscriptionRequestType(); // Subscribe to events BaseFolderIdType[] folders = new BaseFolderIdType[1]; FolderIdType folderId = new FolderIdType(); folderId.Id = "AQEuAAADGkRzkKpmEc2byACqAC/EWgMAb/AGiBJ310+gk0Ag9Tmv/QAAAQ6C+wAAAA=="; folders[0] = folderId; pushSubscription.FolderIds = folders; ..... I get the error with the message, that the object was not found in the informationmemory. Well, I got the ID using this sample: http://groups.google.com.au/group/microsoft.public.exchange.development/browse_thread/thread/b31bda50451a770c/df5a3c2d6fb5313a Can you please help me? Christian

  • Anonymous
    October 01, 2008
    Hi Vikas, my problem is solved! Thank you. Do you know how to get the SMTP-Header from a eMail? Christian

  • Anonymous
    October 01, 2008
    Hi Vikas, my problem is solved! Thank you. Do you know how to get the SMTP-Header from a eMail? Christian

  • Anonymous
    October 07, 2008
    Hi, I have a interesting problem. My subscriber is looking for some public folders to get there ID. Some of them are found and some not. Well, the search request is the same and in the properties in the Exchange Management Console I can not find any difference between them. Do you have any idea what could be the problem or what are the settings for the public folders to be found by a search request? Christian

  • Anonymous
    October 13, 2008
    Hi, We have recently migrated to Exchange 2007 SP1 (108,000 users).. Ad I would liek to start the process to move some integrated applications away from MAPI to EWS. I have posted this question to another previous post in your blog about VBSCRIPT and OOF... What I am doing: We have a Call Center (Avaya) application that it integrated via MAPI.. What it does is update calling hunt groups based on who is in or in or out of office. I would like to be able to do this via VBScript with EWS.

  • Anonymous
    October 15, 2008
    At this point of time you cannot use EWS to set OOF message for other than yourself. This feature should be available in next SP release of Exchange 2007. Till that time you need to stay with MAPI being the only way to Set/Read OOF message for others.

  • Anonymous
    October 23, 2008
    I would like to find a written example on how to use a echange web service to loop through an inbox and find specific messsages depending on their subject row.

  • Anonymous
    October 24, 2008
    Have you checked these samples ? http://blogs.msdn.com/vikas/archive/2007/11/14/howto-ews-find-all-folders-inside-a-parent-folder-helpful-in-generating-a-folder-tree.aspx http://blogs.msdn.com/vikas/archive/2007/07/27/howto-getfolder-finditem-restriction-getitem.aspx All you need to do is first make a FindItem call in the Inbox, and list down all the items that you need. Then using FindFolder you will traverse through each folder inside inbox (recursively) and call the FindItem there after to get there. Do let me know if you need any clarification

  • Anonymous
    November 26, 2008
    I have been working with EWS for a while now. Thank you for doing so much to provide some information on how to actually work with getting to e-mail folders. It seems like so much of the information I find out there for EWS is more related to just tasks and calendaring than it is for e-mail, and what I do find for e-mail is more about sending than working with what has already been received. It gets very frustrating at times. I would definitely like to see more tutorials and documentation on how to do all things e-mail in EWS. You already have folder traversing and searching, and Mark Taylor has a good example of actually finding email and getting the body and attachments here on msdn: http://msdn.microsoft.com/en-us/library/bb508824.aspx But, I am still getting frustrated. Now I am trying to find out more information on moving and deleting mail items using EWS. Can you help?

  • Anonymous
    November 26, 2008
    The comment has been removed

  • Anonymous
    December 18, 2008
    Hi Vikas, I am sending a mail using EWS and I am sucessfull in sending the mails. The problem is once I send a mail and get the temInfoResponseMessageType object from the CreateItemResponse.ResponseMessage object, the ArrayofrealItems object is null and hence I am not able to get the Id and the change key of the newly created e-mail. Can you please help....? Regards, Saqib Mukri,

  • Anonymous
    January 09, 2009
    Can you contact me via http://blogs.msdn.com/vikas/contact.aspx page. I would like to have a look at the code and also the response from the server.

  • Anonymous
    February 02, 2009
    Hi I want to send an email using EWS and I found a sample example of SendItem but it doesnot show any example code but show SOAP messages. I dont know how to use it. Please help me.

  • Anonymous
    February 28, 2009
    HI Vikas, Thanks for the great information you've posted.  I'm trying to read the notes field in a contact and I can't seem to find it. Can you point me in the right direction? Alan

  • Anonymous
    February 28, 2009
    ^^ SR ^^ - You need to call CreateItem with disposition as SendAndSaveCopy (to send an email and store a copy in send items) Here is the sample code http://msdn.microsoft.com/en-us/library/exchangewebservices.createitemtype.aspx I would recommend you to get a copy of Inside Exchange Web Services from MSPress to get started.

  • Anonymous
    February 28, 2009
    ^^ Alan ^^ - The Body is actually the notes field. You can read the Body field of ContactItemType to get/set the notes field. Hope that helps.

  • Anonymous
    March 02, 2009
    I'm trying to send a email with an attachment.  I can't figure it out.  The couple examples I found on the net, don't work.  One on codeproject.com looks like it should, but I can't get the ids working. The example that MSDN comes with to send an email works fine (from CreateItemType class).  I can't figure out how to include the example from the AttachmentType into the CreateItemType example.

  • Anonymous
    March 08, 2009
    Hey James, I will work on that sample and blog it coming week. It should be fairly simple :-)

  • Anonymous
    March 09, 2009
    Hi, I have successfully created and sent email messages using CreateItem method of Exchange WebServices. The  response I get back is of type ResponseMessageType and I see that ResponseClass is success. My requirement is that I need to find out the message id and the exact location/url of the .msg file that was created as a result of CreateItem. How do I get this info? The response message does not give me any info about the message id or .msg file. Thanks

  • Anonymous
    March 09, 2009
    Seema, You need to cast the ResponseMessageType to ArrayOfRealItemsType and then loop through it to find the ItemId. This document has a sample code for CreateItem and how to cast the response into MessageType or ItemType http://msdn.microsoft.com/en-us/library/exchangewebservices.createitemtype.aspx Once you get the MessageType or ItemType you look for property called ItemId.id which will give you an EWS ItemID. EWS Item's id is different from the OWA URL or WebDav item ID. But once you get the EWS Item ID you can use the ConvertID method of EWS to convert to PR_EntryID, StoreID, OwaID. OwaId it most probably what you are looking at. Remember EWS/Exchange/Webdav of nothing store MSG file. MSG file is Outlook specific and once email leave Outlook the message is no longer remain in MSG format. It gets converted to SMTP (rfc822/MIME) format

  • Anonymous
    March 09, 2009
    Here is the link to ConvertID method http://msdn.microsoft.com/en-us/library/bb799665.aspx

  • Anonymous
    March 09, 2009
    Thanks a lot Vikas. I tried it and it works like a charm. Yes OwaId is what I need currently to get me going. I may have some more questions as I progress with my email application, but I am good for now. Thanks again.

  • Anonymous
    March 10, 2009
    Hi Vikas, Is there any way I can pack the content of the message retrieved by the OwaID into a .msg file or any other message file? I understand .msg file is outlook specific but I have provide a link to email message on page and after user clicks on link that email message should load up.

  • Anonymous
    May 18, 2009
    I am looking to assign a task using EWS, There is way to create but no way to assign and send a task. Can someone help.

  • Anonymous
    June 08, 2009
    @Seema.. No you cannot as you understand that's Outlook specific. You should instead look for StoreID & EntryID, with a help of Outlook Add-in you should be able to find the item back in Outlook on the basis of those two IDs. @Waqar.. You cannot send Task requests using EWS, yet. WebDAV and CDO can be used to send those requests in Exchange 2007. You might see the Task requests supported by next version of EWS

  • Anonymous
    June 23, 2009
    I have a application which talks to exchange 2000 and downloads attachments on mail (only for a given mail account). It uses XML "ServerXMLHTTP60Class" for talking and getting mails from Exchange 2000 Q: Can I use same to get mails from Exchange 2007 ? I tried and it is giving "Login Timeout" (I can pass u sample code which I use with Ex. 2000) I saw your samples which deals with Attachments on Exchange 2007, they looks great !!! Q: Which name space I can use for "ExchangeServiceBinding" this ? (I am developing application in a environment, where I don't have a Exchange 2007 server. Is it possible ?)

  • Buddhi -
  • Anonymous
    June 24, 2009
    The comment has been removed

  • Anonymous
    December 15, 2009
    Hi vikas, i want to create a task to other user "using exchnage webservice " exchange server. what API's can i use ? can you help me in this.

  • Anonymous
    December 15, 2009
    Hi vikas, i want to create a task to other user "using exchnage webservice " exchange server. what API's can i use ? can you help me in this.

  • Anonymous
    December 22, 2009
    Hi Vikas, I want to copy email messages from one mailbox to another. I used Exchange Impersonation to get full access for both mailboxes. Then I tried to use EmailMessage.Copy(folderId) method, where folderId is identifier of folder from target mailbox, but it doesn't work (I suppose this method can only work for folders inside email's source mailbox). Does EWS provide any way to accomplish this task?

  • Anonymous
    March 19, 2010
    The comment has been removed

  • Anonymous
    June 30, 2010
    Is it possible to send a task request with EWS?  If so, can you provide a sample?