On 28 May '08, at 4:38 AM, [EMAIL PROTECTED] wrote:

I've build an email application,which doesn't using any email
clients.In this application i've to extract emails and email addresses
from other email clients(example mail.app,entourage etc).

Importing messages from Mail via AppleScript may not be fast enough — my highly scientific estimate* is "a couple of messages" a second. Importing someone's entire mail archive would take a long time.

What you can do instead is scan the mailbox files in ~/Library/Mail. The format is pretty simple, if you take a look. Folders per account (named like "[EMAIL PROTECTED]"), then inside a folder per mailbox, and the messages are in individual ".emlx" files that are basically raw RFC822 message bodies.

Alternatively, since the messages are all indexed by Spotlight, you can just use Metadata.framework to search for all the ones you want and get the info you need.

—Jens

* Quant Suff!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to