View Full Version : How to write a plug-in for an app (Mail)

Jul 27, 2007, 01:51 PM

Im would like to write a plugin for the Mail application, but Im not really sure where to start or what programming languages to begin looking at. I would like the plug-in to have a menu item in Preferences and interact with other applications (in this case the Address Book). Since Im working with Ruby, I started looking at RubyCocoa as a possible candidate for the programming language, but not sure of this would be the best choice for this type of job. Could someone with more experience please point me in the right direction?
How are most plug-ins coded these days? XCode and Objective-C?
Any advice is much appreciated.

Jul 28, 2007, 03:01 AM
The Mail Plugin API is, at best, unofficial and is basically undocumented so you are up against it from the start. Mail is written in Cocoa so all the plugins I have seen for it are too.

As your plugin runs in the process space of the host app I'm not convinced you can use RubyCocoa to write a plugin: I think you have to use Objective-C. Having said that there is a tutorial here (http://www.bazza.com/~eaganj/weblog/2006/03/29/demystifying-mail-app-plugins) showing how to write a plugin using the Python/Cocoa bridge so you might get the Ruby one working in a similar manner.