Reputation: 4009
I am developing a seat plan website. When a desk is clicked I get the info of the person sitting at the desk fine (name,phone,email). Now I want to have a email button beside the persons email address (similar to what lync 2011 had if anyone has seen it). On click off the button I would like to launch a new email in outlook and have the persons email address in the To field.
My solution is being developed in Visual Studio 2010, and uses C#, ASP, XML and Javascript/JQuery/JSON.
Does anyone have any advice on how to achieve this - any links or sample source would be great.
Upvotes: 0
Views: 452
Reputation: 21
Do you want to link it to your default mail composer? You could use html anchor like this
<a href='mailto:[email protected]'>Email</a>
Hope this helps.
Thanks.
Upvotes: 0
Reputation: 146350
mailto:[email protected]
Put that in a link. and viola you are good ^_^
Example:
<a href="mailto:[email protected]">Email Harry</a>
See example here with a button (as described in comments below): http://jsfiddle.net/maniator/DqYKw
Upvotes: 3
Reputation: 2667
If I understand you correctly what you want is when somebody clicks the link/button they have a new E-Mail from outlook come up with the E-Mail in the to bar and they just type their message and hit send ? If so most if not all browsers recognize the mailto:
protocol.
So if you make a link with <a href="mailto:[email protected]">Mail me</a>
. The browser will open up a new message screen addressed to mailto:[email protected].
Just watched out for bots that can crawl this information and use them for spam ....
Upvotes: 0
Reputation: 245479
It's as easy as using a mailto link:
<a href="mailto:[email protected]">Email!</a>
If you need more details, check out this beginner's tutorial from about.com.
Upvotes: 0