如何用电子邮件地址打开Outlook [英] how to open outlook with email address
问题描述
在我的Buttom上点击我想打开一个包含特定地址的Outlook,
private void button1_Click_1(object sender,EventArgs e)
{
System.Diagnostics.Process.Start(" Outlook");
}
当我点击Button1时,它打开了Oulook的窗口,但现在我希望它加载到电子邮件地址:
说,TO。 Test@hotmail.com //这个地址在地址行中
假设您正在编写Windows应用程序(Windows Forms,WPF等),那么你需要传递一个mailto:
URI [ ^ ]到Process.Start
方法:
System.Diagnostics.Process.Start( mailto:test@hotmail.com);
如果您正在编写ASP.NET应用程序,那么您需要使用mailto:
link 在用户的计算机上启动电子邮件客户端,而不是在服务器上启动:
< a < span class =code-attribute> href = mailto:test@hotmail.com > 发送电子邮件< / a >
< blockquote>在Button Click事件中使用以下代码
System.Diagnostics.Process.Start(mailto:test@hotmail.com ); 预
on my Buttom click i want to open an Outlook with particular address in it,
private void button1_Click_1(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("Outlook");
}
SO far when i click on Button1 it opens window for Oulook but now i want it to loaded to Email Address:
say,TO. Test@hotmail.com //this address in a Address line with it解决方案Assuming you're writing a Windows application (Windows Forms, WPF, etc.), then you need to pass amailto:
URI[^] to theProcess.Start
method:
System.Diagnostics.Process.Start("mailto:test@hotmail.com");
If you're writing an ASP.NET application, then you need to use amailto:
link to launch the email client on the user's computer, rather than on the server:
<a href="mailto:test@hotmail.com">Send an email</a>
use the following code in Button Click event
System.Diagnostics.Process.Start("mailto:test@hotmail.com");
这篇关于如何用电子邮件地址打开Outlook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文