how to insert gmail composing button in my website
Asked Answered
R

3

-1

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

Rife answered 29/7, 2013 at 12:4 Comment(1)
...what have you tried? What is your exact question?Ilona
T
3

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&[email protected]&body=my-text">Click here to email</a>

Source

Towns answered 29/7, 2013 at 12:8 Comment(2)
Inside the body of the email or the anchor? Please be more specific. Also, just trying things out! Remember, google is your friend! 99.9% of the time you'll find your answer quicker by searching first.Towns
<a target="_blank" href="mail.google.com/mail/… here to email</a> when i am using <br> tag it also dispalyed in body section of emailRife
H
1

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

Haematocele answered 8/7, 2016 at 9:49 Comment(0)
R
0

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&[email protected]&su=yoursubject&body=my-text&ui=2&tf=1&pli=1')"></a></li>
Ruling answered 20/6, 2017 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.