SquirrelMail is still under development. Therefore you should always
get the newest version around. Look at
- http://squirrelmail.sourceforge.net/index.php3?page=5 to see what it
+ http://www.squirrelmail.org/index.php3?page=5 to see what it
is. If you want to be bleeding edge you might want to consider using
the latest CVS version (with the latest and most fashionable of
bugs).
4. RUNNING SQUIRRELMAIL
-----------------------
- Point your browser at the URL at which SquirrelMail is installed. It
- should be pretty stright forward to use. Some more documentation
- might show up onbe day or another.
+ Point your browser at the URL at which SquirrelMail is installed. A
+ possible example of this is:
+ http://www.yourdomain.com/squirrelmail
+
+ It should be pretty stright forward to use. Some more documentation
+ might show up one day or another.
5. RUSSIAN CHARSETS
$send_to = decodeHeader($send_to);
$send_to_cc = decodeHeader($send_to_cc);
- if ($forward_id) {
- sqimap_mailbox_select($imapConnection, $mailbox);
- $msg = sqimap_get_message($imapConnection, $forward_id, $mailbox);
-
- if (containsType($msg, "text", "html", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"]);
- } else if (containsType($msg, "text", "plain", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"]);
- }
- // add other primary displaying msg types here
- else {
- // find any type that's displayable
- if (containsType($msg, "text", "any_type", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"]);
- } else if (containsType($msg, "msg", "any_type", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"]);
- } else {
- $body = _("No Message");
- }
- }
-
- $type1 = $msg["ENTITIES"][$ent_num]["TYPE1"];
-
- $tmp = _("-------- Original Message ---------\n");
- $body_ary = explode("\n", $body);
- $body = "";
- for ($i=0;$i < count($body_ary);$i++) {
- if ($type1 == "html")
- $tmp .= strip_tags($body_ary[$i]);
- else
- $tmp .= $body_ary[$i];
- $body = "$body$tmp\n";
- $tmp = "";
- }
- }
-
- if ($reply_id) {
+ if ($forward_id)
+ $id = $forward_id;
+ else if ($reply_id)
+ $id = $reply_id;
+
+ if ($id) {
sqimap_mailbox_select($imapConnection, $mailbox);
- $msg = sqimap_get_message($imapConnection, $reply_id, $mailbox);
-
- if (containsType($msg, "text", "html", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"], false);
- } else if (containsType($msg, "text", "plain", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"], false);
- }
- // add other primary displaying msg types here
- else {
- // find any type that's displayable
- if (containsType($msg, "text", "any_type", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"], false);
- } else if (containsType($msg, "msg", "any_type", $ent_num)) {
- $body = decodeBody($msg["ENTITIES"][$ent_num]["BODY"], $msg["ENTITIES"][$ent_num]["ENCODING"], false);
- } else {
- $body = _("No Message");
- }
+ $message = sqimap_get_message($imapConnection, $id, $mailbox);
+ $message = getEntity($message, $ent_num);
+
+ if ($message->header->type0 == "text" || $message->header->type1 == "message") {
+ $body = decodeBody(mime_fetch_body($imapConnection, $id, $message->header->entity_id), $message->header->encoding);
+ } else {
+ $body = "";
}
- $type1 = $msg["ENTITIES"][$ent_num]["TYPE1"];
-
+ if ($forward_id)
+ $tmp = _("-------- Original Message ---------\n");
+ if ($message->header->type1 == "html")
+ $body = strip_tags($body);
+
$body_ary = explode("\n", $body);
$body = "";
- for ($i=0;$i < count($body_ary);$i++) {
- if ($type1 == "html")
- $tmp = strip_tags($body_ary[$i]);
+ for ($i=0; $i < count($body_ary); $i++) {
+ $tmp = $body_ary[$i];
+
+ if ($forward_id)
+ $body = "$body$tmp\n";
else
- $tmp = $body_ary[$i];
- $body = "$body> $tmp\n";
+ $body = "$body> $tmp\n";
}
+
}
-
+
if (!$send_to) {
$send_to = sqimap_find_email($send_to);
}
echo "<input type=\"hidden\" value=\"$id\" name=\"id\">\n";
echo "<table width=80% align=center cellpadding=2 cellspacing=0 border=0>\n";
echo " <tr>\n";
- echo " <td align=right width=40%>\n";
+ echo " <td align=right width=25%>\n";
echo _("Identifying name") . ":";
echo " </td>\n";
- echo " <td width=60%>\n";
+ echo " <td width=75%>\n";
echo " <input type=\"text\" value=\"".$message_highlight_list[$id]["name"]."\" name=\"name\">";
echo " </td>\n";
echo " </tr>\n";
echo " <tr><td><br><br></td></tr>\n";
echo " <tr>\n";
- echo " <td align=right width=40%>\n";
+ echo " <td align=right width=25%>\n";
echo _("Color") . ":";
echo " </td>\n";
- echo " <td width=60%>\n";
+ echo " <td width=75%>\n";
echo " <input type=\"radio\" name=color_type value=1$selected_choose> <select name=newcolor_choose>\n";
echo " <option value=\"$color_list[0]\"$selected0>" . _("Dark Blue") . "\n";
echo " <option value=\"$color_list[1]\"$selected1>" . _("Dark Green") . "\n";
echo " </tr>\n";
echo " <tr><td><br><br></td></tr>\n";
echo " <tr>\n";
- echo " <td align=right width=40%>\n";
+ echo " <td align=right width=25%>\n";
echo _("Match") . ":";
echo " </td>\n";
- echo " <td width=60%>\n";
+ echo " <td width=75%>\n";
echo " <select name=match_type>\n";
if ($message_highlight_list[$id]["match_type"] == "from") echo " <option value=\"from\" selected>From\n";
else echo " <option value=\"from\">From\n";
if ($message_highlight_list[$id]["match_type"] == "subject") echo " <option value=\"subject\" selected>Subject\n";
else echo " <option value=\"subject\">Subject\n";
echo " </select>\n";
- echo " <input type=\"text\" value=\"".$message_highlight_list[$id]["value"]."\" name=\"value\">";
- echo " </td>\n";
+ echo " <nobr><input type=\"text\" value=\"".$message_highlight_list[$id]["value"]."\" name=\"value\"> (";
+ echo _("Regular Expression");
+ echo ")\n <nobr></td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<center><input type=\"submit\" value=\"" . _("Submit") . "\"></center>\n";
$url_replytoallcc = urlencode(getLineOfAddrs($message->header->to) . ", " . getLineOfAddrs($message->header->cc));
$dateString = getLongDateString($message->header->date);
+ $ent_num = findDisplayEntity($message);
/** TEXT STRINGS DEFINITIONS **/
$echo_more = _("more");
echo " </SMALL>\n";
echo " </TD><TD WIDTH=33% ALIGN=RIGHT>";
echo " <SMALL>";
- echo " <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox\">";
+ echo " <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox&ent_num=$ent_num\">";
echo _("Forward");
echo "</A> | ";
- echo " <A HREF=\"compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">";
+ echo " <A HREF=\"compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">";
echo _("Reply");
echo "</A> | ";
- echo " <A HREF=\"compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">";
+ echo " <A HREF=\"compose.php?send_to=$url_replytoall&send_to_cc=$url_replytoallcc&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox&ent_num=$ent_num\">";
echo _("Reply All");
echo "</A> ";
echo " </SMALL>";