Set Gmail As Your Browser’s Default Email Client

15
Set Gmail As Your Browser’s Default Email Client


Sick of mailto: links in your browser opening Outlook or Mail.app whenever you click them? You can tackle this problem with extensions or through other means, but Googler and HTML5 guru Paul Irish offers a simple, no-add-ons-required approach. Here’s how it works:

  1. Open Gmail in Chrome.
  2. Press Ctrl+Shift+J (Windows) or Cmd+Opt+J (Mac) to open Chrome’s built-in JavaScript console.
  3. Paste the following into the console and press Enter:

    navigator.registerProtocolHandler("mailto",
    "https://mail.google.com/mail/?extsrc=mailto&url=%s",
    "Gmail");

  4. Chrome will prompt you, asking if you’d like to “Allow Gmail (mail.google.com) to open all email links?” Click the Use Gmail button.
  5. That’s it!

To test that it worked, try this mailto: link, which should open a new message in Gmail with a link to Irish’s post over on HTML5 Rocks.


mail

Getting Gmail to handle all mailto: links with registerProtocolHandler [HTML5 Rocks]

Comments

Log in to comment on this story!