My Avatar

LanternD's Castle

An electronics enthusiast - survive technically

Change Default Gmail mailto Handler Account

2020-04-28

A method to select the account for processing the mailto links if there are multiple accounts in the browser.

Note

I came accross this problem when I visited Shimmy1996’s blog, which uses email as comment system.

I found that Gmail uses the first account as the default to handle the mailto links. You have to change the link manually (from /u/0 to /u/1 things like that) to switch to another account.

Shimmy pointed out a way to deal with it, changing the default account to handle the link.

Tutorials

Getting Gmail to handle all mailto: links with registerProtocolHandler

This link shows how to add Gmail as the mailto handler in the browser. What we need to change is revising the link in the configuration.

In the Gmail tab/window, open JavaScript console, enter the following:

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

Change the /u/1 to whatever account you want. Press Enter and done.

Now you should be able to use the new account to reply emails.


BTW, I found an interesting text art, share it here:

1
2
3
4
5
6
7
8
9
| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|
|  Pls continue |
|    social     |
| distancing if |
|  ur able to   |
|_________|
(\__/)  || 
(・ ㅅ ・) || 
/   づ

(I modified some characters to achieve satisfying visual effect.)



Disqus Comment 0