How to force web-browser to navigate to Gmail and create (if logged in) new letter with filled in field \'To\' on click on mailto:SomeMail@blabla.com
?
mailto is one of many Url Protocols and it's a way for commands to exit the browser and interact with other applications. I can't find a good site defining what a Url Protocol is but here's how one is registered, it also describes how one is called: http://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx
As a web developer, you won't be able to twist mailto to do what you want on your site. You can use this link:
https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=target@email.com
Not suggested though. Anybody who clicks it needs to be signed into their gmail account (if they have one), but it technically works if the user has gmail and is signed in.
As a user, if you want other sites' mailto links to take you to gmail, then whatever browser you have is bound to have an extension or plug-in you can use that will manipulate mailto links to the link I gave you above.
There's a Greasemonkey script. The compose url is:
https://mail.google.com/mail/?view=cm&fs=1&to=email@domain.com
To add Subject, Body, CC, and BCC, just add the parameters to the URL:
Example:
https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&cc=someone@ola.com&bcc=someone.else@example.com&su=SUBJECT&body=BODY
Or:
<a href="https://mail.google.com/mail/?view=cm&fs=1&to=someone@example.com&cc=someone@ola.com&bcc=someone.else@example.com&su=SUBJECT&body=BODY" target="_blank">Mail Us</a>
Above works also works. I tried following link in my <a>
tag.
https://mail.google.com/mail/u/0/#inbox?compose=new
Probably this would help -
Set Gmail as your default email client in Firefox 3
Making Gmail your default mail application - Gmail Help
<a href="https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=someone@gmail.com" target="_blank">Title</a>