views:

838

answers:

1

Hi,

how do I extract all attachments from an IMAP message? I use Objective-C and Cocoa, but are happy for generic tutorials, code or hints, too.

Regards

A: 

I think what you are saying by a "plain IMAP message" is that you have a sequence of bytes that represent an IMAP message. I'm not aware of any classes built-in to FoundationKit or AppKit which will parse this format and expose the elements of the message (such as the attachment) in the way that you seek. You'll have to either find an existing library for working with IMAP data, or roll up your sleeves and write some code to parse the contents of the email according to the IMAP spec.

erikprice
I've inspected the framework "pantomime". But it isn't documented, which makes it kinda hard to get something useful out of it.Maybe I'll find a tutorial, which shows me how to implement the IMAP spec.
Stefan