JKay
JKay

Reputation: 187

Adding an attachment to default email client from client side

I tried to create a new mail with an attachment using mailto. It is opening a new mail window in Outlook 2010 but without attachment. While investigating the issue I understood that it is impossible to achieve using mailto. Is there any other way to achieve it? I researched about it but I couldn't find anything useful.

Upvotes: 0

Views: 763

Answers (1)

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66235

In Java Script?

  1. If you are running inside IE from a trusted site, you can create an instance of the Outlook.Application COM object and use OOM to create a message with attachments.
  2. You can programmatically build an EML (MIME) file that includes HTML body and attachments and let user download that file. Outlook will be happy to open an EML and display it to an end user.

Upvotes: 2

Related Questions