I’m looking for a way to open the user’s default e-mail program to write a new e-mail and specify an attachment from within a C# application. Right now, I can start an e-mail and specify the recipient, subject, body, etc., but I can’t find any way to also specify an attachment.
System.Diagnostics.Process.Start(@"mailto:me@mydomain.com&subject=Hi&body=%0D%0DSent from my Kinect");
This works great for the basic e-mail, but there’s no way to add an attachment. For a bit of background, my boss wants to use voice commands to get a snapshot from the Kinect and then e-mail it to someone.
Looking through the “Question with similar titles”, I found this, which may be the wrong language but it makes me think that there may be a way to at least do it with Microsoft Outlook. That’s what the large majority of the people at my work use, but I was really hoping for something that would work with any mail client.
I don’t want to just send the e-mail through C#, as I want the user to be able to edit the e-mail within their mail client before sending it.
So, the question: Is there a way to specify an attachment when opening a user’s default e-mail program? And if not, where can I find resources on using C# to create an e-mail in Microsoft Outlook with an attachment?
I have used the code here to open the users default email client with an attachment.