launching the default email client from a C# app
-
Any ideas on how to launch the default email client from within a C# application, attach a file, and specify a subject line and message body? I'd appreciate any input. cobra2005
-
Any ideas on how to launch the default email client from within a C# application, attach a file, and specify a subject line and message body? I'd appreciate any input. cobra2005
You could create a new process with the "mailto" command:
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo = new System.Diagnostics.ProcessStartInfo("mailto:admin@admin.com?subject=Subject text&body=Body text");
myProcess.Start();Regards, Polis Can you practice what you teach?
-
You could create a new process with the "mailto" command:
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo = new System.Diagnostics.ProcessStartInfo("mailto:admin@admin.com?subject=Subject text&body=Body text");
myProcess.Start();Regards, Polis Can you practice what you teach?
Thanks! Is there ANY WAY to specify a file to be sent as an attachment? Seems like there has to be because I could right click on the file and select Send To -> Mail Recipient and I get the send email client with the file attached. Any help would be greately appreciated. cobra2005
-
Thanks! Is there ANY WAY to specify a file to be sent as an attachment? Seems like there has to be because I could right click on the file and select Send To -> Mail Recipient and I get the send email client with the file attached. Any help would be greately appreciated. cobra2005
append &attachment="c:\temp\file.txt" make sure the file exists beforehand
-
append &attachment="c:\temp\file.txt" make sure the file exists beforehand
-
This does not work. I don't think that mailto supports attachments. Any other ideas? cobra2005
google for mailto attachments