<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Attachment size = 0 for Microsoft email address</title> 
  <pubDate>Sun, 05 Apr 2026 20:15:26 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/14238</link> 
  <atom:link rel="self" type="application/rss+xml" title="Attachment size = 0 for Microsoft email address" href="https://bugs.horde.org/ticket/14238/rss" /> 
  <description>Attachment size = 0 for Microsoft email address</description> 
 
   
   
  <item> 
   <title>The attachment&#039;s size is not properly retrieve for Microsoft</title> 
   <description>The attachment&#039;s size is not properly retrieve for Microsoft accounts (Outlook, Hotmail...)

You can find attached the complete Horde_Mime_Part object. 

Retrieving exactly the same email in Outlook and in Gmail, what I obtain when I use a Gmail account:

[Content-Disposition] =&gt; Horde_Mime_Headers_ContentParam_ContentDisposition Object
(
[_params:protected] =&gt; Horde_Support_CaseInsensitiveArray Object
(
[storage:ArrayIterator:private] =&gt; Array
(
[size] =&gt; 752364
 [filename] =&gt; Friends - Issues Descriptions.pdf
)
)
...

What I obtain if I use a Outlook account:

[Content-Disposition] =&gt; Horde_Mime_Headers_ContentParam_ContentDisposition Object
(
[_params:protected] =&gt; Horde_Support_CaseInsensitiveArray Object
(
[storage:ArrayIterator:private] =&gt; Array
(
[size] =&gt; 0
[filename] =&gt; Friends - Issues Descriptions.pdf
)
)
...

I generate the Horde_Mime_Part object as follow:
$mbox = new Horde_Imap_Client_Socket($param_arr);
$query = new Horde_Imap_Client_Fetch_Query();
$query-&gt;structure();
$result = $this-&gt;mbox-&gt;fetch(&#039;Inbox&#039;, $query, array(&#039;ids&#039; =&gt; new Horde_Imap_Client_Ids($id)));
$structure = $result[0]-&gt;getStructure();

* Note, when the attachment is a plain text, the size is properly calculated.</description> 
   <pubDate>Tue, 02 Feb 2016 13:37:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89833</link> 
  </item> 
   
  <item> 
   <title>The size data you are looking for is returned by the IMAP se</title> 
   <description>The size data you are looking for is returned by the IMAP server in the body stucture in the FETCH response - it&#039;s not calculated by Horde. 

For further support, please provide an IMAP debug log while you perform your debug code and the raw message text of a message that this occurs with.</description> 
   <pubDate>Thu, 04 Feb 2016 16:19:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89852</link> 
  </item> 
   
  <item> 
   <title>Hello Michael,

I&#039;ve attached what I think you are looking</title> 
   <description>Hello Michael,

I&#039;ve attached what I think you are looking for, please, don&#039;t hesitate to contact me again if I&#039;m wrong or you need more information. 

Thanks.</description> 
   <pubDate>Fri, 05 Feb 2016 15:22:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89861</link> 
  </item> 
   
  <item> 
   <title>No, sorry.

I&#039;m talking about the imap debug log - it show</title> 
   <description>No, sorry.

I&#039;m talking about the imap debug log - it shows the conversation between the client and server. This is enabled in imp/config/backends[.local].php.  We also need the raw source of an email message - what you would see in IMP, e.g., by clicking &quot;View Message Source&quot; .</description> 
   <pubDate>Fri, 05 Feb 2016 15:30:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89862</link> 
  </item> 
   
  <item> 
   <title>Are this one? </title> 
   <description>Are this one? </description> 
   <pubDate>Wed, 10 Feb 2016 17:23:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89885</link> 
  </item> 
   
  <item> 
   <title>&gt; Are this one?

Yes, but the log doesn&#039;t contain the comm</title> 
   <description>&gt; Are this one?

Yes, but the log doesn&#039;t contain the commands that fetched the email in question.</description> 
   <pubDate>Wed, 17 Feb 2016 17:51:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89989</link> 
  </item> 
   
  <item> 
   <title>Also, your sample email parses perfectly fine for me here:
</title> 
   <description>Also, your sample email parses perfectly fine for me here:

              object(Horde_Support_CaseInsensitiveArray)#417 (1) {
                [&quot;storage&quot;:&quot;ArrayIterator&quot;:private]=&gt;
                array(2) {
                  [&quot;size&quot;]=&gt;
                  string(6) &quot;751293&quot;
                  [&quot;filename&quot;]=&gt;
                  string(36) &quot;Be-Friends - Issues Descriptions.pdf&quot;
                }
              }


WIth code:

$imap = $registry-&gt;mail-&gt;imapOb();
$mbox = new Horde_Imap_Client_Mailbox(&#039;Empty&#039;);
$query = new Horde_Imap_Client_Fetch_Query();
$query-&gt;structure();
$results = $imap-&gt;fetch($mbox, $query, array(&#039;ids&#039; =&gt; new Horde_Imap_Client_Ids(array(&#039;229&#039;))));
var_dump($results[229]-&gt;getStructure());</description> 
   <pubDate>Wed, 17 Feb 2016 18:04:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t89990</link> 
  </item> 
   
  <item> 
   <title>Sorry for my late response.

I&#039;ve include more logs in the</title> 
   <description>Sorry for my late response.

I&#039;ve include more logs in the attached file.It contains:

example email -&gt; source code of the email.
code -&gt; extract from my own code (20 lines and only related to Horde&#039;s management) which explain how to reproduce the error.
Example when it works fine (Gmail account):
gmail horde logs -&gt; logs generated by horde (multiples operations included). 
gmail fetch logs -&gt; log the result of &quot;fetch&quot; (Horde operation). Pay attention to line: 
[size] =&gt; 46276
[filename] =&gt; Happy_cat.jpg

Example when it doesn&#039;t work fine (Outlook account):
outlook horde logs -&gt; logs generated by horde (multiples operations included). 
outlook fetch logs -&gt; log the result of &quot;fetch&quot; (Horde operation). Pay attention to line: 
[size] =&gt; 0
[filename] =&gt; Happy_cat.jpg
</description> 
   <pubDate>Tue, 15 Mar 2016 11:37:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t90177</link> 
  </item> 
   
  <item> 
   <title>Your IMAP server is not returning the body size data for tha</title> 
   <description>Your IMAP server is not returning the body size data for that part. You will have to figure out why this is the case, it is not Horde that is doing it: The integer after the &quot;BASE64&quot; in the following response should be the size of the part.


C: 7 UID FETCH 100501 (BODYSTRUCTURE)
S: * 190 FETCH (UID 100501 BODYSTRUCTURE ((&quot;TEXT&quot; &quot;plain&quot; (&quot;charset&quot; &quot;utf-8&quot; &quot;format&quot; &quot;flowed&quot;) NIL NIL &quot;7BIT&quot; 2 1 NIL NIL NIL NIL)(&quot;image&quot; &quot;jpeg&quot; (&quot;name&quot; &quot;Happy_cat.jpg&quot;) NIL NIL &quot;BASE64&quot; 0 NIL (&quot;attachment&quot; (&quot;filename&quot; &quot;Happy_cat.jpg&quot;)) NIL NIL) &quot;mixed&quot; (&quot;boundary&quot; &quot;------------060000010701080406020507&quot;) NIL NIL NIL))
</description> 
   <pubDate>Tue, 19 Apr 2016 15:20:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t90374</link> 
  </item> 
   
  <item> 
   <title>In fact, a quick google search seems to indicate this is a k</title> 
   <description>In fact, a quick google search seems to indicate this is a known issue with Outlook.com - though no solution is given:

http://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/outlookcom-hotmail-imap-issues-bodystructure/8b970e9d-8971-4cab-b0f8-1d3d51767b49

Closing, as it&#039;s not a Horde bug.</description> 
   <pubDate>Tue, 19 Apr 2016 15:26:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/14238#t90375</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
