Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

GMailTo by N-Dream

Forces all mailto links to open in GMail

Opens GMail if you click on a E-Mail Address Link like bill@microsoft.com

mailto: with GMail

Also check out my Advanced Google Keys script.



Apr 20, 2008
Julien Couvreur Scriptwright

For those interested:
Here is the original "Mailto Compose in GMail" (which was feature in the Greasemonkey Hacks book and handles all the mailto: url formats):
http://userscripts.org/scripts/show/595


 
May 10, 2007
jacotyco User

could you make it so it opens in a new tab?


 
Mar 27, 2007
Mike Cunneen User

Here is a hacked source to open a gmail compose window, as requested. YMMV.

// ==UserScript==
// @name GMailTo
// @namespace andrinvr@gmail.com
// @description Forces all mailto links to open in GMail
// @include *
// ==/UserScript==

//Super fast recursive lookup if it is a mailto: link
function goUp(target,howmany) {
if(howmany>0) {
if(target.nodeName=="A") {
if(target.href.indexOf("mailto:")==0) {
mail=target.href.substring(7);
if((strip=mail.indexOf("?"))!=-1) {
mail=mail.substring(0,strip);
}
if((strip=mail.indexOf("&"))!=-1) {
mail=mail.substring(0,strip);
}
//target.href="http://mail.google.com/mail/?view=cm&fs=1&tf=1&to="+mail;
var mailwin = window.open("https://mail.google.com/mail/?view=cm&tf=0&to="+mail+"&cc=&su=&body=&fs=1","mailwin","menubar=no,toolbar=no,location=no,directories=no,personalbar=no,status=no,dependent=yes,width=640,height=480");
//target.target="_blank";
target.href = null;
target.target = null;
mailwin.focus();
return false;
} else {
return;
}
} else {
if(target.parentNode!=null) {
goUp(target.parentNode,--howmany);
} else {
return;
}
}
} else {
return;
}
}

window.addEventListener("click",function(e) {
if(e.which==1) {
mail=goUp(e.target,5)
}
}, false);


 
Dec 8, 2006
sleijer User

Nice little script.

Could someone tweak the script so that clicking a mailto-link would pop up a Gmail compose window, which closes automatically after you have sent the e-mail. My javascript skills are non-existent :).


 
Nov 15, 2006
cobra75007 User

Super script !!!


 
Oct 25, 2006
Jake McGraw User

This is okay, but this is much better (full support for 'mailto' urls):

http://hacks.oreilly.com/pub/h/4150#code


 
Oct 25, 2006
Ferenc Gerlits Scriptwright

Great little script, thank you!


 
Sep 30, 2006
N-Dream Script's author

Ofcourse it does! LOL


 
Sep 29, 2006
Rafael User

it works


You could comment on this script if you were logged in.