Accessing Email Client from ASP.NET Web Page
I've created ASP.NET pages in the past that sent emails using the .NET classes. However, I'd like to send an email from a webpage using the email software on the client computer.
My understanding is that the mailto: protocol allows for some arguments such as a subject and to address.
But I'm not sure which arguments are supported or how universal that support is. Also, are there other options that give me even greater control over the client's email software?
Ideally, I'd be able to specify more than on开发者_Go百科e to address, the subject, and the email body, which the user could then review and modify before sending.
Thanks.
Here's some basic information about the mailto: protocol's options: http://msdn.microsoft.com/en-us/library/aa767737(v=vs.85).aspx
For security reasons, browsers don't allow you to control the client's email software, so mailTo is probably the best way to go if you're positive that you want the client to use their email software.
Bear in mind that not everyone has something like Outlook properly configured on their computer. I've had relatives who thought they'd been sending out their resume to various places because they clicked mailto: links and composed an email, but they didn't realize that Outlook Express wasn't configured with an SMTP server. So be careful about doing things this way.
<a href="mailto:someone@somewhere.gov?subject=hellosubject&bbc=someone@somewhereelse.gov&body=Enjoy%20your%20stay%0ARegards%20">
http://www.labnol.org/internet/email/learn-mailto-syntax/6748/
精彩评论