开发者

Using C# or jQuery to cause Outlook window to open with a templated body...

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); 
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜