Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using anchor tag to open a mailto and invoke a URL

With one of my requirements i need to open up the default mailing client with invoking a call to a service, this needs to be accomplished using anchor tags or purely html, the constraint is that we can not use javascript for the same. Does anyone have any idea on how to accomplish this?

like image 878
vaibhav Avatar asked Dec 04 '13 10:12

vaibhav


1 Answers

try this:

<a href="mailto:[email protected]">Click to Mail</a>  

This will open default mailing client.

Edit :
You may use onClick function to open new window and call you webservice url in it.like

<a href="mailto:[email protected]" target="_blank" onclick="window.open('your WS URL');">Click to Mail</a>
like image 200
Yagnesh Agola Avatar answered Oct 03 '22 17:10

Yagnesh Agola