Is it possible, and if so how, to use C# or jQuery in an MVC web application to have a button or a link on a page cause Outlook to open up with a set body and subject?
Basically, I want the user to be able to choose a template from a dropdownlist and then click a button or link saying 'Sen开发者_C百科d Templated Email' and have the button/link open up the client's Outlook or default email application with the subject and body populated by the template that they chose.
How could I do that?
You can do this:
<a href="mailto:email@emu.edu?subject=Subject&body=Body Text">
...
// something like this
$('#btn').click(function () {
$('#link').attr('href', 'mailto:' + $('#email').text() + '?body=' + template[idx].body + '&subject=' + template[idx].subject);
})
精彩评论