Click here to Skip to main content
16,020,347 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

Assuming you're writing a Windows application (Windows Forms, WPF, etc.), then you need to pass a mailto: URI[^] to the Process.Start method:
C#
System.Diagnostics.Process.Start("mailto:test@hotmail.com");

If you're writing an ASP.NET application, then you need to use a mailto: link to launch the email client on the user's computer, rather than on the server:
HTML
<a href="mailto:test@hotmail.com">Send an email</a>
 
Share this answer
 
use the following code in Button Click event
System.Diagnostics.Process.Start("mailto:test@hotmail.com");
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900