how to open default mail client with attach files

V

vijaygparikh

HI

i am writting a code for open default mail client and it works fine. i
want to attach a file with the default mail client but file is not
attached with "mailto:" option. If any one has idea about open default
mail client with attach files using "mailto:" then pls reply me.

Thanks in Advance.

regards
vijay parikh

My code is as below.

System.Text.StringBuilder Mystring = new System.Text.StringBuilder();
Mystring.Append("mailto:");
Mystring.Append("&Subject=Finance profit and loss&body=this is test
body");
Mystring.Append("&attach=c:\\test\\test.pdf");
Process myProcess = new Process();
myProcess.StartInfo.FileName = Mystring.ToString();
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.RedirectStandardOutput=false;
myProcess.Start();
myProcess.Dispose();
 
O

Ollie Riches

check out the System.Web.Mail Namespace it gives you better error processing
than attempting to open the default mail client


--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 

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