title: imap_body() returning empty string
body: <p>Hello fellow developers,</p>
  
  <p>Im currently trying to read all emails with imap. Im trying to get the header infos with imap_headerinfo and the body with imap_fetchbody. 
  However, I get all the headerinfo but I only get an empty string as a return from the fetchbody function. I hope someone can help me</p>
  
  <pre><code>$this-&gt;inbox = imap_open($server, $user, $password);
  
      // Header und Body der Email auslesen
      $emails = imap_search($this-&gt;inbox,'ALL');
      foreach($emails as $k) {
          $this-&gt;email_contents[$k] = array(
              'header' =&gt; imap_headerinfo($this-&gt;inbox, $k),
              'body' =&gt; imap_fetchbody($this-&gt;inbox, $k, '1')
          );
      }
      imap_close($this-&gt;inbox);
  </code></pre>
  
  <p>fetch_structure</p>
  
  <pre><code>    object(stdClass)#65 (11) {
    ["type"]=&gt;
    int(1)
    ["encoding"]=&gt;
    int(0)
    ["ifsubtype"]=&gt;
    int(1)
    ["subtype"]=&gt;
    string(5) "MIXED"
    ["ifdescription"]=&gt;
    int(0)
    ["ifid"]=&gt;
    int(0)
    ["ifdisposition"]=&gt;
    int(0)
    ["ifdparameters"]=&gt;
    int(0)
    ["ifparameters"]=&gt;
    int(1)
    ["parameters"]=&gt;
    array(1) {
      [0]=&gt;
      object(stdClass)#66 (2) {
        ["attribute"]=&gt;
        string(8) "boundary"
        ["value"]=&gt;
        string(36) "------------CC4C1146391EA6C129642420"
      }
    }
    ["parts"]=&gt;
    array(2) {
      [0]=&gt;
      object(stdClass)#67 (12) {
        ["type"]=&gt;
        int(0)
        ["encoding"]=&gt;
        int(1)
        ["ifsubtype"]=&gt;
        int(1)
        ["subtype"]=&gt;
        string(5) "PLAIN"
        ["ifdescription"]=&gt;
        int(0)
        ["ifid"]=&gt;
        int(0)
        ["lines"]=&gt;
        int(30)
        ["bytes"]=&gt;
        int(590)
        ["ifdisposition"]=&gt;
        int(0)
        ["ifdparameters"]=&gt;
        int(0)
        ["ifparameters"]=&gt;
        int(1)
        ["parameters"]=&gt;
        array(2) {
          [0]=&gt;
          object(stdClass)#68 (2) {
            ["attribute"]=&gt;
            string(7) "charset"
            ["value"]=&gt;
            string(5) "utf-8"
          }
          [1]=&gt;
          object(stdClass)#69 (2) {
            ["attribute"]=&gt;
            string(6) "format"
            ["value"]=&gt;
            string(6) "flowed"
          }
        }
      }
      [1]=&gt;
      object(stdClass)#70 (13) {
        ["type"]=&gt;
        int(5)
        ["encoding"]=&gt;
        int(3)
        ["ifsubtype"]=&gt;
        int(1)
        ["subtype"]=&gt;
        string(4) "JPEG"
        ["ifdescription"]=&gt;
        int(0)
        ["ifid"]=&gt;
        int(0)
        ["bytes"]=&gt;
        int(1036)
        ["ifdisposition"]=&gt;
        int(1)
        ["disposition"]=&gt;
        string(10) "attachment"
        ["ifdparameters"]=&gt;
        int(1)
        ["dparameters"]=&gt;
        array(1) {
          [0]=&gt;
          object(stdClass)#71 (2) {
            ["attribute"]=&gt;
            string(8) "filename"
            ["value"]=&gt;
            string(11) "logo_sm.jpg"
          }
        }
        ["ifparameters"]=&gt;
        int(1)
        ["parameters"]=&gt;
        array(1) {
          [0]=&gt;
          object(stdClass)#72 (2) {
            ["attribute"]=&gt;
            string(4) "name"
            ["value"]=&gt;
            string(11) "logo_sm.jpg"
          }
        }
      }
    }
  }
  </code></pre>