Open eml file link in Outlook 2010 (and not browse

2019-08-02 02:34发布

问题:

In my application, i have hyperlinks to .eml files. when i click on an .eml file link, the eml opens in the browser (IE).

What i want instead, is to open the .eml in Outlook 2010 directly (or the associated program) and not the browser.

Note that if double-click on an .eml file from my filesystem, the .eml opens in Outlook 2010.

回答1:

This is a question of your browser settings on how to handle the different file/mime types. Have a look there and link the .eml file ending to your Outlook 2010 installation. If you need more control about opening programs on the user's computer you'll need to use Flash or probably Silverlight. Just using HTML and Javascript does not let you control what software is handling the files you are linking to - this is for your own security. And still even with Flash you can't totally control on what software will handle your linked files - as far as I remember you can only set the mime type and that way steer the user's computer into the right direction.