}
function sqimap_get_small_header ($imap_stream, $id, $sent) {
- global $where, $what;
fputs ($imap_stream, "a001 FETCH $id BODY.PEEK[HEADER.FIELDS (Date To From Cc Subject Message-Id X-Priority)]\r\n");
$read = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
}
}
- if ($where == "SUBJECT") {
- $subject = eregi_replace($what, "<b>\\0</b>", $subject);
- }
-
$header = new small_header;
if ($sent == true)
$header->from = $to;
$body .= "</TD></TR><TR><TD BGCOLOR=\"$color[0]\">";
$num = 0;
- /** make this recurisve at some point **/
$body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
$body .= "</TD></TR></TABLE>";
}
}
function translateText($body, $wrap_at, $charset) {
+ global $where, $what; // from searching
+
if (!isset($url_parser_php)) {
include "../functions/url_parser.php";
}
}
function parseEmail ($body) {
+ global $color;
+ /*
+ This is here in case we ever decide to use highlighting of searched
+ text. this does it for email addresses
+
+ if ($what && ($where == "BODY" || $where == "TEXT")) {
+ eregi ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+(\.([a-z]|[0-9]|_|-)+)*", $body, $regs);
+ $oldaddr = $regs[0];
+ if ($oldaddr) {
+ $newaddr = eregi_replace ($what, "<b><font color=\"$color[2]\">$what</font></font></b>", $oldaddr);
+ $body = str_replace ($oldaddr, "<a href=\"../src/compose.php?send_to=$oldaddr\">$newaddr</a>", $body);
+ }
+ } else {
+ $body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+(\.([a-z]|[0-9]|_|-)+)*", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);
+ }
+ */
$body = eregi_replace ("([a-z]|[0-9]|_|\.|-)+\@([a-z]|[0-9]|_|-)+(\.([a-z]|[0-9]|_|-)+)*", "<a href=\"../src/compose.php?send_to=\\0\">\\0</a>", $body);
return $body;
}
echo "<TABLE COLS=1 CELLSPACING=0 WIDTH=97% BORDER=0 ALIGN=CENTER CELLPADDING=0>\n";
echo " <TR><TD BGCOLOR=\"$color[4]\" WIDTH=100%>\n";
- $body = formatBody($imapConnection, $message, $color, $wrap_at);
echo "<BR>";
+
+ $body = formatBody($imapConnection, $message, $color, $wrap_at);
- $whatnew = str_replace(" ", " ", $what);
- if ($where == "BODY" || $where == "TEXT") {
- $body = eregi_replace($whatnew, "<b><font color=\"$color[2]\">\\0</font></b>", $body);
- }
echo "$body";
echo " </TD></TR>\n";