Problems with emailto links
- It opens the default desktop email client to send email, but now-a-days people rarely install such clients due to rise in web based emails.
- In many cases, although the email client is installed but they are not configured.
- In both of above cases browser creates an annoying situation for the users. Either it will show an error message saying no email client has been installed or it will start showing configuration pop up to configure your email client if it is not confugured previously.
How to link to Gmail compose window directly
You can directly link a mailto button to Gmail compose window in full screen mode. Following is the URL to link. The only requirement for this is, user must be login to view the compose window. If user is not login then she/he will be redirected to login page.
To put such a link in your site just add following code.
The only concern of this method is, if user is not currently login she/he will be redirected to login page first. Except this, there is no other issue. It looks awesome on your site.
You can also add some extra flavors to this technique. You can link to Gmail compose window only if the user is currently login in Google, otherwise display the traditional mailto. Here is how you do it.
Linking to Gmail compose window only if user is currently login
Paste the following code in your site to open Gmail compose window based upon user’s login. To verify the functionality, open following link in your browser with and without login. You can understand the difference.
Hope you liked the trick. Let me know your views in the comments.