I use Gmail as my e-mail client, but when I click on a "mailto:" link, the Mail.app is opened.
Is there a way to avoid the Mail.app opening in this case? Can I open Gmail instead?
Both Google Chrome and Firefox support this functionality. (ok, technically these are third party apps, but lets assume you are not using safari.)
If you made a mistake and selected "No" and you really wanted to select "Use Gmail"
See @Am1rr3zA answer on this question. Click here to jump to his answer.
If you're using Chrome, this is now very simple: open settings, search for "mailto", and set Gmail as the handler for
For Firefox, see this answer.
(The remainder of this answer is now obsolete.)
While options like Webmailer also do the job, I'll mention yet another way for the sake of completeness:
Besides directing clicks on mailto: links to Gmail, the Google Notifier comes with some additional features: It adds an icon (like this: ) in the menu bar and notifies you (if configured to do so) about new mail in your Gmail box. Through the icon you can also access your inbox, unread messages, and "Compose mail" screen quickly.
Works great for me; I can generally vouch for this useful little app.
If you use Firefox 3.5 or later:
Or you can use More Internet, a System Preferences pane that lets you choose which applications are set as helpers for Internet protocols.