how to insert gmail composing button in my website

允我心安 提交于 2019-12-01 13:28:55

问题


i have gmail mail icon link.when i click the link it will open gmail compose message(when user already login) otherwise it will goto gmail login page.

Exatly like mynthra site

http://www.myntra.com/Shirts/Mast-Harbour/Mast-Harbour-Men-Navy-Erida-Slim-Smart-Casual-Shir/123607/buy?nav_id=7&searchQuery=men-casual-shirts&serp=2&uq=false#!

in above link,below the product image have gmail icon is there,same operation i need


回答1:


A quick google search and here is your answer. Just use the given URL instead of mailto:

Example:

<a target="_blank" href="https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=youremail@gmail.com&body=my-text">Click here to email</a>

Source




回答2:


You can add a new line with %0a instead of \n for gmail and some other email clients.




回答3:


You can send mail with subject. Open with popup Modal Box:-

<script type="text/javascript" async >
    function genericSocialShare(url){
       window.open(url,'sharer','toolbar=0,status=0,width=648,height=395');
       return true;
    }
</script>

<a href="javascript:void(0)" onclick="javascript:genericSocialShare('https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=youremail@gmail.com&su=yoursubject&body=my-text&ui=2&tf=1&pli=1')"></a></li>


来源:https://stackoverflow.com/questions/17923536/how-to-insert-gmail-composing-button-in-my-website

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!