Thursday, November 13, 2008

Moving away from Mail.app

As most people know, I have moved away from using Apple's Mail.app as my email client. I now use mutt to perform all of my mail duties... or, so I thought.

The other day I decided to use iCal to send an event invitation to a friend. When I clicked on the send button, I was greeted with a copy of Mail.app, not exactly I wanted. At this point I changed the default Mail application to mutt (via iTerm).

Now you would expect iCal to listen to this setting, but alas, the mail was still (automatically) sent with Mail.app.

After a lot of investigating, I discovered there is a apple script within the iCal app bundle. The script of interest is /Applications/iCal.app/Contents/Resources/Mail.applescript. After spending a few hours learning applescript, I came up with a solution. You will need to replace the file /Applications/iCal.app/Contents/Resources/Mail.applescript with the one available from my repositories.

Once you have replaced this file, you must then recompile the script: osacompile -o /Applications/iCal.app/Contents/Resources/Scripts/Mail.scpt /Applications/iCal.app/Contents/Resources/Mail.applescript

Note: You will need to have at the mail script and modify it so that it points to the correct version of mutt on your system.

No comments:

Post a Comment