6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/5/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1463] Message previews sometimes show MIME-glut
*
Your Email Address
*
Spam protection
Enter the letters below:
.___..__ .__ \ /._. | [__)[__) >< | | | \| \/ \_|_
Comment
> Some messages contain information at the top about the MIME parts, > see the sample at the end for an example. This causes message > previews to display this ugly text instead of the start of the actual > message. > > > > A partial fix/hack is to remove the MIME info from the preview with a > regex. In horde/imp/lib/Mailbox.php, after line > > 294: $ptext = trim(strip_tags(@imap_fetchbody($imp['stream'], > $header->msgno, 1))); > > insert the line > > $ptext = preg_replace('/^.*Content\-Transfer\-Encoding\:.*?\n/s', '', > $ptext, 1); > > > > This only works if the first message part, that imap_fetchbody > fetches is the plain text part. If it is an attachment or something > then we can never get the text from it. To handle all situations, > we'd have to add in some code to make sure we fetch the plain-text > part of the message (if there is one of course) to use for the > preview. > > > > ** BEGIN MESSAGE SAMPLE ** > > This is a multi-part message in MIME format. > > --------------050807000301030204090007 > > Content-Type: multipart/alternative; > > boundary="------------010801040006060501020508" > > > > > > --------------010801040006060501020508 > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Content-Transfer-Encoding: 7bit > > ** END MESSAGE SAMPLE **
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