Summary | Attachment size = 0 for Microsoft email address |
Queue | IMP |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | Horde Developers (at) |
Requester | cbellmont (at) be-bound (dot) com |
Created | 02/02/2016 (3462 days ago) |
Due | |
Updated | 04/19/2016 (3385 days ago) |
Assigned | 04/19/2016 (3385 days ago) |
Resolved | 04/19/2016 (3385 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Not A Bug
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's not a Horde bug.
State ⇒ Feedback
You will have to figure out why this is the case, it is not Horde that
is doing it: The integer after the "BASE64" in the following response
should be the size of the part.
C: 7 UID FETCH 100501 (BODYSTRUCTURE)
S: * 190 FETCH (UID 100501 BODYSTRUCTURE (("TEXT" "plain" ("charset"
"utf-8" "format" "flowed") NIL NIL "7BIT" 2 1 NIL NIL NIL NIL)("image"
"jpeg" ("name" "Happy_cat.jpg") NIL NIL "BASE64" 0 NIL ("attachment"
("filename" "Happy_cat.jpg")) NIL NIL) "mixed" ("boundary"
"------------060000010701080406020507") NIL NIL NIL))
Assigned to
New Attachment: horde logs.zip
I've include more logs in the attached file.It contains:
example email -> source code of the email.
code -> extract from my own code (20 lines and only related to Horde's
management) which explain how to reproduce the error.
Example when it works fine (Gmail account):
gmail horde logs -> logs generated by horde (multiples operations included).
gmail fetch logs -> log the result of "fetch" (Horde operation). Pay
attention to line:
[size] => 46276
[filename] => Happy_cat.jpg
Example when it doesn't work fine (Outlook account):
outlook horde logs -> logs generated by horde (multiples operations included).
outlook fetch logs -> log the result of "fetch" (Horde operation). Pay
attention to line:
[size] => 0
[filename] => Happy_cat.jpg
object(Horde_Support_CaseInsensitiveArray)#417 (1) {
["storage":"ArrayIterator":private]=>
array(2) {
["size"]=>
string(6) "751293"
["filename"]=>
string(36) "Be-Friends - Issues Descriptions.pdf"
}
}
WIth code:
$imap = $registry->mail->imapOb();
$mbox = new Horde_Imap_Client_Mailbox('Empty');
$query = new Horde_Imap_Client_Fetch_Query();
$query->structure();
$results = $imap->fetch($mbox, $query, array('ids' => new
Horde_Imap_Client_Ids(array('229'))));
var_dump($results[229]->getStructure());
in question.
New Attachment: logs.zip
I'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 "View
Message Source" .
New Attachment: Horde_Imap_Client_Fetch_Results Object
I've attached what I think you are looking for, please, don't hesitate
to contact me again if I'm wrong or you need more information.
Thanks.
Priority ⇒ 1. Low
State ⇒ Feedback
the body stucture in the FETCH response - it'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.
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: horde files.zip
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Attachment size = 0 for Microsoft email address
Type ⇒ Bug
(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] =>
Horde_Mime_Headers_ContentParam_ContentDisposition Object
(
[_params:protected] => Horde_Support_CaseInsensitiveArray Object
(
[storage:ArrayIterator:private] => Array
(
[size] => 752364
[filename] => Friends - Issues Descriptions.pdf
)
)
...
What I obtain if I use a Outlook account:
[Content-Disposition] =>
Horde_Mime_Headers_ContentParam_ContentDisposition Object
(
[_params:protected] => Horde_Support_CaseInsensitiveArray Object
(
[storage:ArrayIterator:private] => Array
(
[size] => 0
[filename] => 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->structure();
$result = $this->mbox->fetch('Inbox', $query, array('ids' => new
Horde_Imap_Client_Ids($id)));
$structure = $result[0]->getStructure();
* Note, when the attachment is a plain text, the size is properly calculated.