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

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
 
S

Siva M

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
 
T

Tom Porterfield

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top