Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

How to get attachments using ews

$
0
0

Hello All,

I am trying to get and load the attachment from the exchange. I have used the below code to retrieve it 

 blnHasAttachments = email.HasAttachments;
                if (blnHasAttachments && email.Attachments[0] is FileAttachment)
                {

                    ContentID = email.Attachments[0].ContentId;
                    FileAttachment fileattachment = email.Attachments[0] as FileAttachment;
                    fileattachment.Load();
                }

However, I do not want to store the attachments physically; whenever I will access the email; then only it should show/retrieve.

Also, after clicking on the attachment; how to retrieve its data/content and show the window to user to download/open/save  the attachment.

I have already visited lot of links and searched on the net; but didn't find any good solution. !

Any help on this appreciated

Regards,

Rohit


Viewing all articles
Browse latest Browse all 7132

Trending Articles