6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/11/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#15026] BUG in Horde_Imap_Client : XML attachment is corrupted
*
Your Email Address
*
Spam protection
Enter the letters below:
\ /.___.. .. .. . >< _/ |\ || ||__| / \./__.| \||/\|| |
Comment
> Cannot reproduce this. > > 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> > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers