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.


Incidentally, this feature has been around in Firefox since Firefox 3, so Firefox users, you can accomplish the same task by following roughly the same steps. However, Firefox has also gone a step further to make this easier. Open Firefox Preferences, click the Applications tab, and type mail into the search filter. In the Action dropdown for the Content Type mailto, select Use Gmail. Easy peasy.

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


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


15 responses to “Set Gmail As Your Browser’s Default Email Client”

Leave a Reply