How to unblock .mat files in Outlook

April 28th, 2012 | Categories: matlab, Microsoft | Tags:

A MATLAB user at Manchester recently sent me some code and data as part of a Condor support request but Outlook helpfully blocked access to his .mat files deeming them potentially unsafe!  It seems that Microsoft Outlook is afraid of matrices.

I guess that the easiest way to proceed would be to ask him to resend his stuff as a .zip file but that would slow down the support query.  I just wanted to stop Outlook being quite so paranoid and let me have access to those scary matrices.

The fix is a registry edit (very user-friendly of Microsoft right?) so please don’t proceed if you are not comfortable editing the registry.  The registry controls numerous aspects of the Windows operating system along with many of the applications you have installed.  If it had a map then there would be huge areas labelled ‘Here be Dragons.’ Corrupting the registry could lead to an unusable operating system. So, the following is offered without warranty on a ‘it works for me’ basis.

Open up regedit and navigate to the following  (I’m using Windows 7 and Outlook 2007, location and procedure may be different for different environments).


Once you have the above highlighted, move your mouse to the right hand pane of regedit, and right click to get a context menu.  Click on New->String Value and create a key-value pair with

  • Name Level1Remove
  • Value Data .mat

If you want to unblock more than just .mat then you can separate them with semicolons so .mat;.exe for example.  When you’ve finished, this part of the registry should look like the screenshot below
allowing .mat files in Outlook

  1. Ed Hoyle
    April 30th, 2012 at 10:13
    Reply | Quote | #1

    The MAT file extension is also used for Microsoft Access shortcuts. Outlook does not like the sending of shortcuts as email attachments. I believe this is the source of your problem.

  2. April 30th, 2012 at 15:20
    Reply | Quote | #2

    Thanks Ed–That’s exactly the problem.

    The thing is that in over 15 years of using email I have never received a Microsoft Access shortcut but I get a LOT of MATLAB .mat files. If outlook made it easy to configure which file extensions to trust then there would be no point to this blog post.


  3. Steve L
    April 30th, 2012 at 19:51
    Reply | Quote | #3

    FYI, searching for “Outlook MAT” found this as the second hit, which includes a list of the extensions that are blocked. MAT is blocked as a file of type “Access Table Shortcut (Microsoft)”:

    The Microsoft knowledge base article to which that document links offers the Registry edit approach as an advanced technique for unblocking attachments with the .mat extension:

  4. April 30th, 2012 at 20:46
    Reply | Quote | #4

    Thanks Steve. If only there were a Microsoft-supported solution which doesn’t require registry diving!

  5. August 21st, 2012 at 01:18
    Reply | Quote | #5

    Minor detail – I right clicked and selected new “String Value” rather than new “Key” to get the above screenshotted result and the desired end outcome. Thanks.

  6. Mike Croucher
    March 20th, 2014 at 15:27
    Reply | Quote | #6

    Thanks for that. Fixed.