title: How to get the MIME Type of a .MSG file?
body: <p>I have tried these ways of finding the MIME type of a file...</p>
  
  <pre><code>Path source = Paths
                  .get("C://Users/akash/Desktop/FW Internal release of MSTClient-Server5.02.04_24.msg");
          System.out.println(Files.probeContentType(source));
  </code></pre>
  
  <p>The above code returns  <code>null</code>...<br>
  And if I use the TIKA API from Apache to get the MIME type then it gives it as text/plain...</p>
  
  <p>But I want the result as <code>application/vnd.ms-outlook</code></p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I also used <code>MIME-Util.jar</code> as follows with code...</p>
  
  <pre><code>MimeUtil2 mimeUtil = new MimeUtil2();
          mimeUtil.registerMimeDetector("eu.medsea.mimeutil.detector.MagicMimeMimeDetector");
          RandomAccessFile file1 = new RandomAccessFile(
                  "C://Users/akash/Desktop/FW Internal release of MSTClient-Server5.02.04_24.msg",
                  "r");
          System.out.println(file1.length());
          byte[] file = new byte[624128];
          file1.read(file, 0, 624128);
          String mimeType = MimeUtil2.getMostSpecificMimeType(mimeUtil.getMimeTypes(file)).toString();
  </code></pre>
  
  <p>This gives me output as <code>application/msword</code></p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>Tika API is out of scope as it is too large to include in the project...</p>
  
  <p>So how can I find the MIME type?</p>