API for Mail.app and Stickies

Discussion in 'Mac Programming' started by Amuraivel, Nov 14, 2008.

  1. Amuraivel macrumors member

    Joined:
    Jan 31, 2006
    #1
    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
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    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).
     
  3. hhas macrumors regular

    Joined:
    Oct 15, 2007
    #3
    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).

    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.
     
  4. Amuraivel thread starter macrumors member

    Joined:
    Jan 31, 2006
    #4
    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?
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #5
    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).
     

Share This Page