Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Amuraivel

macrumors member
Original poster
Jan 31, 2006
91
0
Two questions:

1. For Safari there is the WebKit framework that makes building a webbrowser relative straight forward, is there an API for Mail.app data?


2. Is there an API for the stickies database.

I have tried finding something for both, but no dice.


Amuraivel
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
1. See NSMailDelivery for sending emails via Mail.app. Go here for some sample code.
2. There is none. The file ~/Library/StickiesDatabase can be read with some hacking around via NSUnarchiver (and class-dump).
 

hhas

macrumors regular
Oct 15, 2007
126
0
Two questions:

1. For Safari there is the WebKit framework that makes building a webbrowser relative straight forward, is there an API for Mail.app data?

2. Is there an API for the stickies database.

Nothing official for Stickies. If you want to interact with Mail.app, it has an Apple event ("AppleScript") interface (officially supported public API; somewhat buggy and inadequately documented) and an NSBundle-based plugin API (private, undocumented API; a number of folks have written third-party plugins for it, but caveat emptor).

kainjow said:
1. See NSMailDelivery for sending emails via Mail.app.

NSMailDelivery is deprecated as of Leopard. However, there are a number of third-party Cocoa frameworks for sending email, including:

http://www.collaboration-world.com/pantomime
http://www.theronge.com/mailcore
http://www.mulle-kybernetik.com/software/EDFrameworks

If the OP wants more specific advice or recommendations, they'll need to provide a bit more info about what it is they want to do.
 

Amuraivel

macrumors member
Original poster
Jan 31, 2006
91
0
mbox

Thanks for the hints on sending mail.

But I would also like to read the MBOX files directly not simply send mail. The goal is to develop an app that uses all the apple native files.

Does anyone know of how these are read, and can be written to in OBJ-C?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
If you're wanting to read Mail's data, start off with the ~/Library/Mail/Envelope Index file. It's a SQLite database. I'm pretty sure the raw email files inside the .mbox folders are named using each message's ID which is stored in the DB (last time I checked).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.