How do I change OS X's default mail app without a GUI?
February 15, 2008 12:28 PM   Subscribe

How can I change the default Mail application in OS X with a script (not through the Mail.app GUI)?

I need to change the default Mail application as part of a larger setup process that will be used with a lot of computers. I've looked around online quite a bit and the only ways I've found are through Mail's GUI or some other third party application's GUI.

I need to do this in an Applescript, but I can call some other kind of script if I need to. My ideal solution would be something I can do in right in the Applescript or a simple command line command I can run. Does anyone know of anything?
posted by sjl7678 to Computers & Internet (2 answers total) 1 user marked this as a favorite
 
checkout changing/editing plists... most of the prefs in os x are defined by them.

How to Change the Default Email Client on Mac OS X
posted by wackoacko at 12:40 PM on February 15, 2008


The file you want is ~/Library/Preferences/com.apple.launchservices.

At the end of the file are the handlers for various filetypes/urls- one of them is "LSHandlerURLScheme = mailto", and the Handler for it is set to "com.apple.mail". Go to Apple Mail, change the pref there, and see what the change in the file is.

If you know how to script up search and replace, you should be good to go.
posted by mkultra at 1:14 PM on February 15, 2008


« Older Where can I hire lower cost software developers in...   |   Eternally useful info Newer »
This thread is closed to new comments.