We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Example usage of ExchangeAttachmentInfo


Is there any example available for ExchangeAttachmentInfo? I can’t find any sample code in API documentation.

Hi Acton,

Thank you for posting your inquiry.

You can use the following sample code to have an idea about the example usage of ExchangeAttachmentsInfo. Please note that fetching such information is time taking task and that is why it is not fetched by default. Please try it at your end and share your feedback with you.


static void Email_658992()


  IEWSClient client = GetAsposeEWSClient1();

  ExchangeMessageInfoCollection msgCollection = client.ListMessages(client.MailboxInfo.InboxUri, -1, ExchangeListMessagesOptions.FetchAttachmentInformation);

  foreach (ExchangeMessageInfo msgInfo in msgCollection)


foreach (ExchangeAttachmentInfo EAInfo in msgInfo.Attachments)


  	Console.WriteLine("Attachment Name: " + EAInfo.Name);

  	Console.WriteLine("Attachment Size: " + EAInfo.Size);