title: Javax mail api: getting part.getdispotion()= null even if attachment in present
body: <p>I am facing this issue after using the  mac mailing service.<br>
  able to read attachments  if  I use outlook or gmail.      </p>
  
  <p>piece of code where  I am reading the attachment from mail.</p>
  
  <pre><code>if (contentType.contains("multipart"))
          {
              Multipart multiPart = (Multipart) msg.getContent();
              int partCount = multiPart.getCount();                                       
  
              for (int j = 0; j &lt; partCount; j++)
              {
                  BodyPart part = multiPart.getBodyPart(j);                                           
                  if (Part.ATTACHMENT.equalsIgnoreCase(part.getDisposition()))    // getting null here
                  {
                      attachmentProcessing = true;
                      InputStream is;
                      is = part.getInputStream();
                      f = new File(filePath + part.getFileName());
                      fileArray.add(f);
                      FileOutputStream fos = new FileOutputStream(f);
                      byte[] buf = new byte[4096];
                      int bytesRead;
                      while((bytesRead = is.read(buf))!=-1) {
                          fos.write(buf, 0, bytesRead);
                      }
                      fos.close();
                  }                                       
              }
          }
  </code></pre>
  
  <p>part details for mac mailing service:</p>
  
  <blockquote>
    <p>text/plain; charset=us-ascii<br>
    part.getDisposition() = null<br>
    multipart/mixed; boundary="Apple-Mail=_C50D7E2D-27A1-4449-BAA3-5DC9D1E522AF"</p>
  </blockquote>
  
  <p>and for others </p>
  
  <blockquote>
    <p>multipart/mixed; boundary="----=_NextPart_000_0033_01D28DC6.C9D0C8B0"<br>
    text/plain; name=HashTagList.txt; charset=us-ascii<br>
    part.getDisposition() = attachment</p>
  </blockquote>