开发者

How to create SendTo mail recipient feature in C# Windows Form Application? [duplicate]

开发者 https://www.devze.com 2023-03-29 14:41 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to send email using default email client?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to send email using default email client?

How can I create SendTo mail recipient feature in C# Windows Form Application? Something like this:

How to create SendTo mail recipient feature in C# Windows Form Application? [duplicate]

I need to open the Default Email client in the system and users allowed to enter to address, subject, mail body etc.

I found some code in C++ but I am looking for managed or WIN32 AP开发者_StackOverflow社区I code.


Try SmtpClient if you know all details of the message and just want to send it.

If you need to invoke the mail client, you can use Process.Start and pass it a mailto: link. There are some good examples of crafting mailto links on the web, I found this one.


I think this is what you may be looking for.

  1. Visit http://msdn.microsoft.com/en-us/library/aa767737(VS.85).aspx and read up on the mailto syntax.

  2. Visit http://weblogs.asp.net/jgalloway/archive/2007/02/24/sending-files-via-the-default-e-mail-client.aspx and see that there is an example on using the mailto format to load the default email client on a machine using System.Diagnostics.Process.Start

0

精彩评论

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