Version 0.2 -- January 02, 2000
-------------------------------
- Attachment support (better MIME support in general)
+- Themeable support replaced Custom Colors. Themes are pluggable.
Version 0.1.2 -- December 20, 1999
3. Edit the config file, config/config.php
-4. Point your browser to the location you specified in step 2.
+4. Change permissions of the "data/" directory so that the web server
+ can write to it. Here is an example from Red Hat 6.0:
+ cd <SQUIRREMAIL DIRECTORY>
+ chown nobody data
+
+5. Point your browser to the location you specified in step 2.
In this example, it's: http://YOURHOST/squirrelmail-0.1/index.html
$smtpPort = 25;
// This is displayed right after they log in
- $motd = "";
- $motd .= "You are using SquirrelMail's web-based email client. If you run into any bugs or have ";
- $motd .= "suggestions, please report them to our <A HREF=\"mailto:squirrelmail-list@sourceforge.net\">mailing list</A>";
+ $motd = "You are using SquirrelMail's web-based email client. If you run into any bugs or have suggestions, please report them to our <A HREF=\"mailto:squirrelmail-list@sourceforge.net\">mailing list</A>";
-// Customizable colors
+// Themes
// You can define your own theme and put it in this directory. You must
// call it as the example below. You can name the theme whatever you
// want. For an example of a theme, see the ones included in the config
// directory.
+//
+// You can download themes from http://squirrelmail.sourceforge.net/index.php3?page=10
+//
// Example: require("../config/default_theme.php");
- require("../config/tan_theme.php");
+ require("../config/default_theme.php");
// Whether or not to use $color[11] for special folders. If not, special
// folders will be the same color as the other folders
function error_username_password_incorrect($color) {
echo "<BR>";
- echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
+ echo "<TABLE COLS=1 WIDTH=75% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
echo " <TR>";
echo " <TD BGCOLOR=\"$color[0]\">";
echo " <FONT FACE=\"Arial,Helvetica\"><B><CENTER>ERROR</CENTER></B></FONT>";
function general_info($motd, $org_logo, $version, $org_name, $color) {
echo "<BR>";
- echo "<TABLE COLS=1 WIDTH=70% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
+ echo "<TABLE COLS=1 WIDTH=80% NOBORDER BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
echo " <TR>";
echo " <TD BGCOLOR=\"$color[0]\">";
echo " <FONT FACE=\"Arial,Helvetica\"><B><CENTER>Welcome to $org_name's WebMail system</CENTER></B></FONT>";
echo " </TD></TR><TR><TD>";
echo " <TR><TD BGCOLOR=\"$color[4]\">";
- echo " <FONT FACE=\"Arial,Helvetica\" SIZE=-1><CENTER>Running SquirrelMail version $version (c) 1999 by Nathan and Luke Ehresman.</CENTER></FONT>";
+ echo " <FONT FACE=\"Arial,Helvetica\" SIZE=-1><CENTER>Running SquirrelMail version $version (c) 1999-2000.</CENTER></FONT>";
echo " </TD></TR><TR><TD>";
- echo " <TABLE COLS=2 WIDTH=75% NOBORDER align=\"center\">";
+ echo " <TABLE COLS=2 WIDTH=90% NOBORDER align=\"center\">";
echo " <TR>";
echo " <TD BGCOLOR=\"$color[4]\"><CENTER>";
if (strlen($org_logo) > 3)
}
/** This function gets all the information about a message. Including Header and body **/
- function fetchMessage($imapConnection, $id) {
+ function fetchMessage($imapConnection, $id, $mailbox) {
+ $message["INFO"]["ID"] = $id;
+ $message["INFO"]["MAILBOX"] = $mailbox;
$message["HEADER"] = fetchHeader($imapConnection, $id);
$message["ENTITIES"] = fetchBody($imapConnection, $message["HEADER"]["BOUNDARY"], $id, $message["HEADER"]["TYPE0"], $message["HEADER"]["TYPE1"]);
$i++;
}
+ if ( ($encoding == "us-ascii") && ($type0 != "text") && ($type0 != "message") ) {
+ $encoding = "base64";
+ }
+
/** remove the header from the entity **/
$i = 0;
while (trim($read[$i]) != "") {
$display_filename = $filename;
}
- $body[$pos] .= "<TT> <A HREF=\"../data/$filename\">" . $display_filename . "</A> <SMALL>(TYPE: $type0/$type1)</SMALL></TT><BR>";
- $file = fopen("../data/$filename", "w");
- /** Determine what encoding type is used **/
- if ($message["ENTITIES"][$i]["ENCODING"] == "base64") {
- $thefile = base64_decode($message["ENTITIES"][$i]["BODY"][0]);
- } else {
- $thefile = $message["ENTITIES"][$i]["BODY"][0];
- }
+ $urlMailbox = urlencode($message["INFO"]["MAILBOX"]);
+ $id = $message["INFO"]["ID"];
+ $body[$pos] .= "<TT> <A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$i\">" . $display_filename . "</A> <SMALL>(TYPE: $type0/$type1)</SMALL></TT><BR>";
- fwrite($file, $thefile);
- fclose($file);
}
}
$body[$q] = ereg_replace("=3D", "=", $body[$q]);
}
$newbody = $body;
+ } else if ($encoding == "base64") {
+ $newbody = base64_decode($body);
} else {
$newbody = $body;
}
if ($forward_id) {
selectMailbox($imapConnection, $mailbox, $numMessages);
- $msg = fetchMessage($imapConnection, $forward_id);
+ $msg = fetchMessage($imapConnection, $forward_id, $mailbox);
$body_ary = formatBody($msg);
$tmp = "-------- Original Message ---------\n";
if ($reply_id) {
selectMailbox($imapConnection, $mailbox, $numMessages);
- $msg = fetchMessage($imapConnection, $reply_id);
+ $msg = fetchMessage($imapConnection, $reply_id, $mailbox);
$body_ary = formatBody($msg);
for ($i=0;$i < count($body_ary);$i++) {
selectMailbox($imapConnection, $mailbox, $numNessages);
$unseen = unseenMessages($imapConnection, $numUnseen);
+ echo "<NOBR>";
if ($unseen)
$line .= "<B>";
$line .= " (<B><A HREF=\"empty_trash.php?numMessages=$numMessages&mailbox=$urlMailbox\" TARGET=right style=\"text-decoration:none\">empty</A></B>)";
$line .= "</FONT></a>\n";
}
+
+ echo "</NOBR>";
return $line;
}
// $message contains all information about the message
// including header and body
- $message = fetchMessage($imapConnection, $passed_id);
+ $message = fetchMessage($imapConnection, $passed_id, $mailbox);
+ echo "$mailbox, $passed_id<BR>";
echo "<HTML>";
- echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"" . $message["HEADER"]["TYPE"][0] . "/" . $message["HEADER"]["TYPE"][1] . "; charset=" . $message["HEADER"]["CHARSET"] . "\">";
echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
displayPageHeader($color, $mailbox);