Kennedy Kennedy - 4 months ago 38
PHP Question

how to insert gmail composing button in my website

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

Answer

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