I am trying to add a feature to my C# / .Net app for a user to email a file. When a user has Outlook installed, I can successfully use the Outlook interop APIs to do exactly what I want. However on a new Windows 10 install, I cannot work out how to open an email with an attachment in the default Mail app, which is from the Windows Store.
I have tried:
Using EML files, as per https://stackoverflow.com/a/25586282/2102158
- The Mail app does not register itself to open EML files
Using the MAPI32.dll etc. (I used the code from https://github.com/metageek-llc/inSSIDer-2/blob/master/MetaScanner/UnhandledException/MapiMailMessage.cs)
- A dialog box pops up saying there is no email program registered. It seems the mail app does not interact with MAPI
Using mailto: links.
- The mail program opens, but it does not respect Attachment= or Attach= parameters
Also
Windows.ApplicationModel.Email.EmailMessage seems to be only availble on phones.
I do not want to use SMTP to send the message server side.
I also tried the MS-UNISTORE_EMAIL: and OUTLOOKMAIL: url schemes, which are associated to the Mail app, they seemed to behave the same as mailto:
There does not seem to be any way to start the Mail app from the command line