- $pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay');
-
- $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
- sqimap_mailbox_select($imap_stream, $mailbox);
- $message = sqimap_get_message($imap_stream, $passed_id, $mailbox);
-
-
-// --start display setup--
-
- // From and Date are usually fine as they are...
- $from = decodeHeader($message->header->from);
- $date = getLongDateString($message->header->date);
-
- // we can clean these up if the list is too long...
- $cc = decodeHeader(getLineOfAddrs($message->header->cc));
- $to = decodeHeader(getLineOfAddrs($message->header->to));
-
- // and Body and Subject could easily stream off the page...
- $id = $message->header->id;
- $ent_num = findDisplayEntity ($message, 0);
- $body_message = getEntity($message, $ent_num);
- if (($body_message->header->type0 == 'text') ||
- ($body_message->header->type0 == 'rfc822')) {
- $body = mime_fetch_body ($imap_stream, $id, $ent_num);
- $body = decodeBody($body, $body_message->header->encoding);
- $hookResults = do_hook("message_body", $body);
- $body = $hookResults[1];
- if ($body_message->header->type1 == 'html') {
- if( $show_html_default <> 1 ) {
- $body = strip_tags( $body );
- translateText($body, $wrap_at, $body_message->header->charset);
- } else {
- $body = MagicHTML( $body, $id );
- }
- } else {
+$pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay');
+
+$imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
+sqimap_mailbox_select($imap_stream, $mailbox);
+$message = sqimap_get_message($imap_stream, $passed_id, $mailbox);
+
+/* --start display setup-- */
+
+/* From and Date are usually fine as they are... */
+$from = decodeHeader($message->header->from);
+$date = getLongDateString($message->header->date);
+
+/* we can clean these up if the list is too long... */
+$cc = decodeHeader(getLineOfAddrs($message->header->cc));
+$to = decodeHeader(getLineOfAddrs($message->header->to));
+
+/* and Body and Subject could easily stream off the page... */
+$id = $message->header->id;
+$ent_num = findDisplayEntity ($message, 0);
+$body_message = getEntity($message, $ent_num);
+if (($body_message->header->type0 == 'text') ||
+ ($body_message->header->type0 == 'rfc822')) {
+ $body = mime_fetch_body ($imap_stream, $id, $ent_num);
+ $body = decodeBody($body, $body_message->header->encoding);
+ $hookResults = do_hook('message_body', $body);
+ $body = $hookResults[1];
+ if ($body_message->header->type1 == 'html') {
+ if( $show_html_default <> 1 ) {
+ $body = strip_tags( $body );