how to trigger default email client (.Net 1.1 with C#)

  • Thread starter Thread starter jswedberg
  • Start date Start date
J

jswedberg

Hi all,

I'm trying to have a Windows App (.Net 1.1 with C#) trigger the default
email app and populate the email with the To addresses and the subject. I'm
not having any luck tracking down any references on how to accomplish this.
Any suggestions would be appreciated.

Thanks,
Jon
 
Try this: Process.Start ("mailto:[email protected]?Subject=Subject
Line");

Hi all,

I'm trying to have a Windows App (.Net 1.1 with C#) trigger the default
email app and populate the email with the To addresses and the subject. I'm
not having any luck tracking down any references on how to accomplish this.
Any suggestions would be appreciated.

Thanks,
Jon
 
jswedberg said:
I'm trying to have a Windows App (.Net 1.1 with C#) trigger the default
email app and populate the email with the To addresses and the subject.
I'm not having any luck tracking down any references on how to accomplish
this. Any suggestions would be appreciated.

Let the Windows shell do the work:

System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = true;
p.StartInfo.FileName = "mailto:[email protected]?subject=This is a test";
p.Start();
 
Back
Top