Download attachments from mail

Feb 2, 2012 at 5:48 AM
Edited Feb 2, 2012 at 5:51 AM

Hello All,

Is there a way to download attachments from the message?

- I have been able to loop through the messages in inbox.

- Then fetching the body structure of the message.

- Looping through messageBodyParts.

- Evaluating if messageBodyPart is an attachment using messageBodyPart.Attachment.

- Successfully getting the attachment type i.e. tiff, pdf etc...

- But then couldn't find a way to actually download the attachment. :(

Can any one be of any help in this regard?


Feb 2, 2012 at 9:54 PM

I believe there is a method to return the encoded attachment but as for an easy to use way to download the attachment, I'm not sure that exists. I was working on a new way to parse messages that would make that process a lot easier but have not found time. Especially since I am currently not doing anything mail related professionally.

Feb 3, 2012 at 1:57 AM

Glad to see your reply newbish.

Mate, would it be possible for you to suggest any code for downloading the attachments ?

I am very close to implement my solution but this last thing (download attachment) is making me worried if I should continue to use Koolwired.IMAP dll ?

Your assistance would really make it possible for me to deploy my solution.

Looking forward.