-SquirrelMail version 0.1.1
-December 18, 1999
-------------------------
+Last revised: December 26, 1999
-For information on installing, see INSTALL
+Contents
+--------
+General Information ................................................. 1.0
+ About SquirrelMail ................................................ 1.1
+ History ........................................................... 1.2
+ Contact Information ............................................... 1.3
-SquirrelMail's goal is to be an easy-to-configure web-based email
-client. For more information about SquirrelMail, please visit our
-web site: http://squirrelmail.sourceforge.net
+Installation ........................................................ 2.0
-If you have questions, please direct them to the mailing list
-specified on the web site. Please do not email us directly unless
-absolutely necessary.
+Liscensing .......................................................... 3.0
-This product is distributed under the GPL liscense. Please read
-COPYING for more information.
+FAQ ................................................................. 4.0
+ Can SquirrelMail run with PHP3? ................................... 4.1
+ Why PHP4 when it's only in BETA? .................................. 4.2
+ Where did you get the name "SquirrelMail?" ........................ 4.3
-Thanks,
-Luke and Nathan
+
+
+
+
+
+-- Section 1.0 --
+ General Information
+ ----------------------------------------------------------------------
+ 1.1 - About SquirrelMail
+
+ So what exactly is SquirrelMail? It's a web interface to email that's
+ written in PHP4. It was designed to allow email access through your
+ server from anywhere in the world via the Web.
+
+
+
+ 1.2 - History
+
+ The need arose in our organization for the access of email and address
+ books from anywhere in the world. Obviously a web interface is ideal
+ for this, given that the user has access to the Internet. After
+ reviewing several open source projects we realized that we were going
+ to need to do some fairly major customizations to get things to be a
+ nice fit for our needs. So the decision was made to create our own for
+ some of these reasons, and for fun (we really like PHP4). We decided
+ to open source the project to contribute to the community that has
+ contributed so much to us.
+
+
+
+ 1.3 - Contact Information
+
+ If you need to contact the developers of SquirrelMail for some reason,
+ please email the mailing list. Bug reports and ideas should be sent
+ to the mailing list also.
+
+ Mailing List: squirrelmail-list@sourceforge.net
+
+ If for some reason, you need to contact us directly, you can also
+ email us at:
+
+ Luke Ehresman: luke@usa.om.org
+ Nathan Ehresman: nathan@usa.om.org
+
+ Web Page: squirrelmail.sourceforge.net
+
+
+-- Section 2.0 --
+ Installation
+ ----------------------------------------------------------------------
+
+ Please view the INSTALL document that was included in this package.
+
+
+
+
+
+-- Section 3.0 --
+ Liscensing
+ ----------------------------------------------------------------------
+
+ This product is distributed under the GPL liscense. Please read
+ COPYING for more information.
+
+
+
+
+
+-- Section 4.0 --
+ Frequently Asked Questions
+ ----------------------------------------------------------------------
+ Q: Can SquirrelMail be run with PHP3?
+
+ Yes, and No. It is fully developed under PHP4 BETA3, however PHP is
+ pretty good about backwards compatability. Theoretically, it
+ shouldn't be too hard to port it to PHP3, but you definately would
+ have to do some code tweaking. Let us know of any success or horror
+ stories if you attempt it.
+
+ Q: Why PHP4 when it's only in BETA?
+
+ PHP4 is significantly faster than PHP3. When we were viewing
+ mailboxes with 500-1000 messages in them, it would take about 15-30
+ seconds to sort them. With PHP4, that time has been cut down to 5-10
+ seconds for large boxes.
+
+ Q: Where did you get the name, "SquirrelMail"?
+
+ It's derived from the over-abundant squirrel population in Georgia
+ this year. We were playing volleyball one day, and saw a squirrel
+ try to jump between trees. He failed miserably and fell 40 feet to
+ the ground. So, we had squirrels on our mind the next day when we
+ were coming up with a name.
\ No newline at end of file
function decodeMime($body, $bound, $type0, $type1) {
-// echo "$type0/$type1<BR>";
+ echo "<TT>decodeMime: $type0/$type1</TT><BR>";
if ($type0 == "multipart") {
if ($body[0] == "")
$i = 1;
$j = $i + 1;
$p = 0;
- while (substr(trim($body[$j]), 0, strlen($bound)) != $bound) {
- $entity_body[$p] = $body[$j];
+ while ((substr(trim($body[$j]), 0, strlen($bound)) != $bound) && (trim($body[$j]) != "")) {
+ $entity_header[$p] = $body[$j];
$j++;
$p++;
}
- fetchEntityHeader($imapConnection, $entity_body, $ent_type0, $ent_type1, $ent_bound, &$encoding, &$charset);
+
+ fetchEntityHeader($imapConnection, $entity_header, $ent_type0, $ent_type1, $ent_bound, $encoding, $charset);
+
+ if ($ent_type0 == "text") {
+ while (substr(trim($body[$j]), 0, strlen($bound)) != $bound) {
+ $entity_body[$p] = $body[$j];
+ $j++;
+ $p++;
+ }
+ } else {
+ if (trim($body[$j]) == "")
+ $j++;
+ while (substr(trim($body[$j]), 0, strlen($bound)) != $bound) {
+ $entity_body .= $body[$j];
+ $j++;
+ }
+ }
$entity = getEntity($entity_body, $ent_bound, $ent_type0, $ent_type1, $encoding, $charset);
$q = count($full_message);
/** This gets one entity's properties **/
function getEntity($body, $bound, $type0, $type1, $encoding, $charset) {
-// echo "--$type0/$type1--<BR>";
+ echo "<TT>getEntity: $type0/$type1</TT><BR>";
$msg[0]["TYPE0"] = $type0;
$msg[0]["TYPE1"] = $type1;
$msg[0]["ENCODING"] = $encoding;
$msg[0]["BODY"][$p] = $body[$q];
}
}
+ } else if ($type0 == "image") {
+ $msg[0]["PRIORITY"] == 5;
+ $msg[0]["BODY"][0] = $body;
} else {
$msg[0]["BODY"][0] = "<B><FONT COLOR=DD0000>This attachment is of an unknown format: $type0/$type1</FONT></B>";
}
$pos = count($body);
if ($message["ENTITIES"][$i]["TYPE0"] != "text") {
if ($message["ENTITIES"][$i]["TYPE0"] == "image") {
- $body[$pos] = "<TT> Image: " . strtoupper($message["ENTITIES"][$i]["TYPE1"]) . "</TT><BR>";
+ $body[$pos] = "<TT> Image: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "</TT><BR>";
+
+/* $file = fopen("../data/tmp.png", "w");
+ fwrite($file, base64_decode($message["ENTITIES"][$i]["BODY"][0]));
+ fclose($file);
+*/
} else {
$body[$pos] = "<TT> Unknown Type: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "</TT><BR>";
}