locked
EML files are not opened in the browser RRS feed

  • Question

  • EML files opened from a SharePoint 2010 document libraries are not opened in the browser. Instead, a dialog box is opened and prompts to save the file.  
    Since there's no standard application that knows how to handle EML files, and since the EML format is built into SP (send emails to document libraries), I think this behavior is unacceptable.
    EML files should be opened in the browser, similar to SP 2007.  
    Tuesday, January 19, 2010 3:32 PM

Answers

  • I have WSS 3.0 and my eml files open in the browser. looks great no problems , even the attachment is displayed.

    But in sharepoint foundation 2010 they do not.  I am prompted to save file.

    Here are the thing i have checked.

    1. Mime types in IIS are the same and eml is there.
    2. blocked files in sharepoint admin are the same
    3. library Advance settings for the document store set to "open in the client application"

    I have noticed that the template is set to .doc (wss 3) and .dotx in foundation

    Same workstation when testing both seperate websites.

     I changed this in sharepoint administrator and my problem is fixed:

    Go to Web Application - General Settings and set "Browser File Handling" to "Permissive".

     

    • Proposed as answer by felipeg007 Friday, September 10, 2010 7:10 PM
    • Marked as answer by Thomas Rizzo Friday, September 10, 2010 10:37 PM
    Friday, September 10, 2010 7:07 PM

All replies

  • Outlook 2010 will open .eml files

    I believe that eml files were restricted from opening in the browser to protect against a vulnerability where a malicious user could put script in the file that would be executed by a visiting user.
    I make SharePoint Catch me on twitter (@spwiki) or email (kevin.davis@microsoft.com)
    Wednesday, January 20, 2010 10:09 PM
  • Requiring Outlook 2010 is a bad solution:
    A. Not everyone will have Outlook 2010 (What about Outlook 2007 users, Lotus Notes users, etc...).
    B. EML documents won't be accessible from mobile devices.

    If youre worried about malicious code, why not just preventing JS running in EMLs?

    Friday, January 22, 2010 5:04 PM
  • As Kevin says this was done as a security measure - but you can be less restrictive by setting the Browser File Handling on your Web Application to Permissive rather than the default (which is Strict). Doing so will revert to .eml files opening in the browser. Not sure if there is a list of files that are affected when you switch to Strict mode but it would be nice if an admin could specify...
    Friday, January 22, 2010 6:30 PM
  • I have a feeling that IT guys will never change the "Browser File Handling" to "Permissive".
    Why not offer a solid out-of-the-box solution?
    Sunday, January 24, 2010 10:25 AM
  • I believe Windows Live Mail can be used to read the .eml files too.

    Tuesday, January 26, 2010 9:14 AM
  • Since when Windows Live Mail is a standard application?

    There are mobile devices, Linux, organizations that won't have Windows Live Mail installations.

    I think it's definitely a bug in SharePoint.
    SharePoint generates EML documents w/o having the ability to view them by default.
     
    I think you should consider an out-of-the-box solution for this issue. I can suggest a couple:
    * Preventing JS from running inside EMLs.
    * Using the mhtml format which is a browser-standard.

     
    Tuesday, January 26, 2010 4:42 PM
  • Sorry to glom on to someone elses three week old thread but I agree completely with therealkingonly.  This limitation in EML files cripples the usefullness of SharePoint lists accepting emails.  I appreciate the security concerns but stripping out the JavaScript is a much better solution.

    Tuesday, February 16, 2010 2:55 PM
  • To open an EML file programmatically, you may need a mail component . Some examples are found at these imap , pop3 and smtp blogs.
    Thursday, July 1, 2010 4:42 PM
  • I have WSS 3.0 and my eml files open in the browser. looks great no problems , even the attachment is displayed.

    But in sharepoint foundation 2010 they do not.  I am prompted to save file.

    Here are the thing i have checked.

    1. Mime types in IIS are the same and eml is there.
    2. blocked files in sharepoint admin are the same
    3. library Advance settings for the document store set to "open in the client application"

    I have noticed that the template is set to .doc (wss 3) and .dotx in foundation

    Same workstation when testing both seperate websites.

     I changed this in sharepoint administrator and my problem is fixed:

    Go to Web Application - General Settings and set "Browser File Handling" to "Permissive".

     

    • Proposed as answer by felipeg007 Friday, September 10, 2010 7:10 PM
    • Marked as answer by Thomas Rizzo Friday, September 10, 2010 10:37 PM
    Friday, September 10, 2010 7:07 PM
  •  Me too have the same issue while sending the Email to the Document library and opening, it shows a popup window to save the file..

     Could we get the solution from OOTB or some customization..for opening the document directly when we click on it.

     

    Regards,

    Rakesh.

    Tuesday, September 14, 2010 6:32 PM
  • Hey guys. We're experiencing the same exact issue. I set the Browser Handling to permissive and it works, but the emails open in a completely blank window. I mean it's cool and all, but it doesn't seem right. Seems like the messages should be opening up within the sharepoint container.

    I'm surprised this issue has been open for so long. Any updates on this? I appreciate your help thus far.

    Thursday, September 30, 2010 5:08 PM
  • Answer 2 on this page has an answer: http://www.go4answers.com/Example/sharepoint-replacement-exchange-public-56386.aspx changing the mime-type for .eml to  application/octet-stream on the iis. But I still have problems with inconsistent behaviour. My eml-files opened in Outlook just as I want them to, but only the first time I clicked them. Now I'm back with only the save option...

    /Sebastian

    Tuesday, October 5, 2010 12:11 PM
  • Hi:

    There is a better way to handle "Browser File Handle" issue. Take a look at my blog here: http://www.pdfsharepoint.com/sharepoint-2010-and-pdf-integration-series-part-1/

    Solution #2 addresses Pdf extension without exposing entire Web Application to "Permissive" browsing. In your case you will just put eml MIME type.

    Thanks,

    Dmitry

    Tuesday, March 15, 2011 5:47 PM
  • .yes it can, as long as its left in mail, but when u save it to libraries ,,,documents, it will NOT open  in the original eml file, and won't open attachments.
    Friday, March 18, 2011 4:40 PM
  • I have windows 7 and MOSS 2007. Eml files are opened in browsers, which I did not like. The browser did not open the attachment though someone here claims it can.

    How can I configure the system to open eml in outlook 2007 by just clicking the file?

    I have configured the file association follwoing this link: http://www.msoutlook.info/question/354. I als added the parameter /eml to the outlook.exe application.

    I totally agree with most here that MS saved the emails in eml but could not have a way to configure to use which tools to open/view them! MS is too big or SharePoint is too big then obivously dev teams are disconnected and no communications are at this level of details...

    Monday, April 11, 2011 7:23 PM
  • Seems the solution is in the client side configuration.

    If eml files (as all other file types) are not configured to open by default in Outlook 2007 (or Windows Live Mail), they will be prompted for download or open.

    The registry change link I provided earlier did not work for me. I tried this: http://webcache.googleusercontent.com/search?q=cache:-hgG6T55trAJ:john-h-selnes.spaces.live.com/blog/cns!6C7F16530F119E8D!3092.entry+how+to+configure+sharepoint+to+opem+eml+file+in+outlook+2007%3F&cd=1&hl=en&ct=clnk&gl=us&source=www.google.com and solved my problem. Seems by default eml file set to MIME message/rfc822 and associated with windows live mail - SharePoint team hates Outlook team, right?

    If you do not have such assoication, it opens in browser!

    My settings: MOSS 2007, windows 7, outlook 2007.

    Wednesday, April 13, 2011 3:13 PM
  • Hi I get this same issue but there's a difference if I open the file from the browser on the server which does not have Outlook the .eml file opens in the browser. But from a client machine I get promted to save the file...

    This must be a matter with the client that has Outlook and MOSS2010 this is not an issue with MOSS2007...

    Monday, June 27, 2011 10:08 AM
  • Hi,

    according to the web page http://filext.com/file-extension/EML the mime type of the .eml files is "message/rfc822", so instead of setting the Browser File Handling on your Web Application to Permissive, you can allow just this specific mime type via PowerShell, like:

    $webApp = Get-SPWebApplication http://yourwebapp
    $mimeType = "message/rfc822"
    $webApp.AllowedInlineDownloadedMimeTypes.Add($mimeType)
    $webApp.Update()

    Regards,
    Peter

    Thursday, March 13, 2014 10:37 AM