Paul's Things http://paul.baumgart.us Most recent posts at Paul's Things posterous.com Sat, 03 Apr 2010 02:53:00 -0700 Opening mailto: Links in Gmail with Google Chrome on Mac OS X http://paul.baumgart.us/opening-mailto-links-in-gmail-with-google-chr http://paul.baumgart.us/opening-mailto-links-in-gmail-with-google-chr

I couldn't find a good way to get Google Chrome to open mailto: links in Gmail, so I made a little AppleScript-based application to do it for me:

http://github.com/paulbaumgart/gmail-mailto-chrome-handler

These are the instructions from the README:

How to use Gmail Mailto Chrome Handler

  1. Make sure Google Chrome is your default browser. This program will probably break mailto: links if you have a different default browser.
  2. Download Gmail Mailto Chrome Handler.app, put it somewhere useful (like /Applications), and run it.
  3. Try clicking this mailto: link. If it opens a new message in Gmail, you're all done!
  4. If the mailto link didn't work as expected, open Mail.app, go to Preferences, and under the General tab, select Gmail Mailto Chrome Handler.app as your "Default email reader".

Report any problems to paul@baumgart.us, or fix them and send a pull request.

It even handles mailto: links that open in a new tab correctly. The only thing that doesn't work 100% is middle- or command-clicking a mailto: link. In that case, an extra empty tab will be opened. But just don't do that and you'll be fine.

Inspired by this: http://www.macosxautomation.com/applescript/linktrigger/index.html

Also, thanks to Joe for pointing out this trick and listing the relevant caveats: http://code.google.com/p/chromium/issues/detail?id=27468#c32

 

Update 4/6/2010:

subject/body/bcc/cc should now be handled also. Let me know if this is not working as expected.

 

Update 3/1/2011:

Several people have asked me how to make the mailto: handler work with Google Apps. The following steps should do the trick:

  1. In Finder, navigate to where you saved the Gmail Mailto Chrome Handler.app.
  2. Right-click or control-click on Gmail Mailto Chrome Handler.app and select "Show Package Contents"
  3. Navigate to Contents/Resources/Scripts/ and double click on main.scpt to open it in AppleScript Editor.
  4. Scroll down to where you see the line: set urlTemplate to "https://mail.google.com/mail?view=cm&tf=0&to="
  5. Change that line to: set urlTemplate to "https://mail.google.com/a/YOUR_APPS_DOMAIN/?view=cm&tf=0&to=" (where YOUR_APPS_DOMAIN is the domain for your Google Apps email addresses, something like yourcompany.com)
  6. Save and close AppleScript Editor. Assuming you also followed the "How to use" steps above, everything should work now.

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/902138/me.jpg http://posterous.com/users/37lvkNN04ofv Paul Baumgart paulbaumgart Paul Baumgart