locked
Microsoft Exchange WebServices, funny problem with Attachments... RRS feed

  • Question

  • Hi guys!

    I have the next problem: I coudn't get the attachments from Exchange Server, but in debugger I can see in option "HasAttachments" , that they are, please look:

    Why it could be? I'm doing it for test, sending different mail to server with different attachments, Maybe there is a problem , because of Security? And that's why I can't get the files from mails.

     

    Best Regards,

    Oleg

    Monday, August 15, 2011 1:05 PM

Answers

  • Hi,

     

    see http://msdn.microsoft.com/en-us/library/dd633665%28v=exchg.80%29.aspx for an example. You need to pass the ItemSchema.Attachments to the ItemView you are using to bind to the item.

     

    Kind regards,

    Henning

    • Marked as answer by magesi Tuesday, August 16, 2011 8:52 AM
    Monday, August 15, 2011 2:54 PM

All replies

  • Hi,

     

    see http://msdn.microsoft.com/en-us/library/dd633665%28v=exchg.80%29.aspx for an example. You need to pass the ItemSchema.Attachments to the ItemView you are using to bind to the item.

     

    Kind regards,

    Henning

    • Marked as answer by magesi Tuesday, August 16, 2011 8:52 AM
    Monday, August 15, 2011 2:54 PM
  • I have passed and so what?

    Monday, August 15, 2011 6:30 PM
  • If you pass the ItemSchema.Attachments in a GetItems operation, the Attachments property should contain the attachment details.
    Monday, August 15, 2011 7:29 PM
  • I'm getting the "Id is malformed", when I try to use like:

    EmailMessage message = EmailMessage.Bind(service, new ItemId("AAMkA"), new PropertySet(BasePropertySet.IdOnly, ItemSchema.Attachments));
    Tuesday, August 16, 2011 6:51 AM
  • Where do you get your id from?
    Tuesday, August 16, 2011 8:21 AM
  • Ah... My appologies...

    I have used in code:

    new ItemId("AAMkA")
    But, needed to use: new ItemId(item.Id.ToString()) , because unique id was not valid...
    Tuesday, August 16, 2011 8:51 AM