Open Gmail on mailto: action

前端 未结 6 2084
借酒劲吻你
借酒劲吻你 2020-12-05 06:58

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?

6条回答
  •  自闭症患者
    2020-12-05 07:39

    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.

提交回复
热议问题