Lier les liens mailto: avec gmail


lier les liens mailto a gmail avec register

Tech24-informatique-dordogne

ProtocolHandler

Pour cela il faut ouvrir la console avec ctrl-shift-j et entrer

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

puis accepter l autorisation.

et voila !

If you use Gmail you may become frustrated when you click a mailto: link by accident and now your desktop client of Outlook or Mail starts up. Thanks to navigator.registerProtocolHandler() (which we've covered here before) you can wire up Gmail as your default mail client for all mailto: links in Chrome and Firefox.

Here's how:

  1. First, open up a Gmail tab. You must do this from the Gmail tab, not your html5rocks one. :)

  2. Open your javascript console (cmd-opt-j on Mac, ctrl-shift-j on Windows) and enter:

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

  4. Accept the confirmation from the browser.

  5. Click this mailto: link to test out your new Gmail mailto hookup!

If you ever need to removing this setting, you can do that at chrome://settings/handlers in Chrome and Preferences->Applications->mailto in Firefox.

#googleapps #gsuite #gmail