Summary | BUG in Horde_Imap_Client : XML attachment is corrupted |
Queue | Horde Framework Packages |
Type | Bug |
State | Not Reproducible |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | kripper (at) imatronix (dot) cl |
Created | 07/20/2020 (1788 days ago) |
Due | |
Updated | 01/31/2021 (1593 days ago) |
Assigned | 07/20/2020 (1788 days ago) |
Resolved | 01/31/2021 (1593 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Not Reproducible
Priority ⇒ 1. Low
I imported the .eml file you sent me into my inbox and I can
successfully parse the text/xml part, without any extraneous line
breaks being inserted.
This is the quick bit of code I used to pull down the part, executed
directly in Horde's admin phpshell:
<code>
// Get the Horde_Imap_Client object
$imap = $registry->mail->imapOb();
$mbox = new Horde_Imap_Client_Mailbox('INBOX');
// Fetch the message in question
$query = new Horde_Imap_Client_Fetch_Query();
$query->structure();
$query->envelope();
$query->headerText(array('peek' => true));
$results = $imap->fetch(
$mbox,
$query,
array('ids' => new Horde_Imap_Client_Ids(array(436786)), 'exists' => true)
);
$message = $results[436786];
// Check out the mime part structure
$basePart = $message->getStructure();
foreach ($basePart->partIterator() as $part) {
echo $part->getMimeId() . ': ' . $part->getType() . "\r\n";
}
// Get the part we want and decode it
$bpp = array(
'decode' => true,
'peek' => true);
$q = new Horde_Imap_Client_Fetch_Query();
$q->bodyPart(2, $bpp);
$q->mimeHeader(2, array('peek' => true));
$fetch_res = $imap->fetch(
$mbox,
$q,
array('ids' => new Horde_Imap_Client_Ids(array(436786)))
);
// Output
echo $fetch_res[436786]->getBodyPart(2);
</code>
Priority ⇒ 2. Medium
State ⇒ Feedback
mrubinsk@horde.org. If you'd like to encrypt it you can find my PGP
key on keybase.io. https://keybase.io/mrubinsk
but this was not possible.
Please contact me via E-mail.
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ BUG in Horde_Imap_Client : XML attachment is corrupted
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed