By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,373 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,373 IT Pros & Developers. It's quick & easy.

how to open default mail client with attach files

P: n/a
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();

Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

<vi**********@gmail.com> wrote in message
news:11*********************@l41g2000cwc.googlegro ups.com...
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();

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.