1
votes

I want to open the default mail client registering on Windows and create an email with an attachment.

The behaviour is just like when you right click on a file, the Send to -> Mail Recipient. Or when you compressing a folder and select 'compress and email' on the context menu.

I have tried:

  1. mailto:[email protected], which doesn't accept attachment.
  2. MAPI, which works well when the outlook is shutdown, but doesn't work when the outlook is currently working. Do you know how to make it work?

Do you have any other ideas?

Thanks!

1

1 Answers

1
votes

Depending on the version of your mail client, try to add &attach="C:\some_file.txt to the end of mailto:[email protected]. This should add an attachment when the mail client opens. If attach does not work, try attachment in stead. I wonder if you can't add both.