473,395 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to open default mail client with attach files

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
1 12539
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Peter Amberg | last post by:
I would like to create a link on my page that opens the standard e-mail application when someone clicks it. It should have at least the subject preset, better if I could preset the body as well. I...
3
by: Gama Franco | last post by:
Hi, I'm working on a project based in Windows Forms, and I need to open the user's default e-mail client (a new e-mail) with some attachments ready to send. Since the destination of the e-mail...
0
by: vijaygparikh | last post by:
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...
1
by: Chris Welch | last post by:
I'm developing a very small Web-based mail application as part of a larger Online Contact System for a client. I was struggling for a few hours with how to handle e-mail attachments and I thought...
2
by: GD | last post by:
Hi, An intranet application, with a SMTP mail function that lets users to attach files with emails by selecting files in their local computers (through a file browser component), works perfect on...
2
by: Landley | last post by:
Hello, Is there a way of creating an email, attaching a file and sending using the client's default mail client? I am looking for a none email client specific solution that does not involve...
3
by: Mateusz Rajca | last post by:
Hello! How do I open the default email client, and attach a file? Matt
2
by: Hanika | last post by:
Going on 3 days and I am wodnering if I am just not looking in the right place. If anyone nows how to do this please please help me. I am developing a Windows form application using VB.NET 2005....
23
by: andyoye | last post by:
How can I launch Outlook on users machines when they click a button on a web form (InfoPath)? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.