From: lkehresman Date: Mon, 27 Dec 1999 14:52:40 +0000 (+0000) Subject: Updated the README, also made images load quicker X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=bcb432a37b8baaf9de42ffa0732580859cee3d56 Updated the README, also made images load quicker git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@92 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/README b/README index a66c2323..5a21458a 100644 --- a/README +++ b/README @@ -1,19 +1,111 @@ -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 diff --git a/config/config.php b/config/config.php index 753fb61d..3a297977 100644 --- a/config/config.php +++ b/config/config.php @@ -10,17 +10,17 @@ $org_title = "OM-USA WebMail"; // The server that your imap server is on - $imapServerAddress = "adam.usa.om.org"; + $imapServerAddress = "localhost"; $imapPort = 143; // The domain where your email address is. // Example: in "luke@usa.om.org", usa.om.org is the domain. // this is for all the messages sent out. Reply address // is generated by $username@$domain - $domain = "usa.om.org"; + $domain = "localhost"; // Your SMTP server and port number (usually the same as the IMAP server) - $smtpServerAddress = "adam.usa.om.org"; + $smtpServerAddress = "localhost"; $smtpPort = 25; // This is displayed right after they log in diff --git a/functions/mime.php b/functions/mime.php index 4347fd50..f00754a9 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -6,7 +6,7 @@ function decodeMime($body, $bound, $type0, $type1) { -// echo "$type0/$type1
"; + echo "decodeMime: $type0/$type1
"; if ($type0 == "multipart") { if ($body[0] == "") $i = 1; @@ -20,12 +20,28 @@ $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); @@ -42,7 +58,7 @@ /** This gets one entity's properties **/ function getEntity($body, $bound, $type0, $type1, $encoding, $charset) { -// echo "--$type0/$type1--
"; + echo "getEntity: $type0/$type1
"; $msg[0]["TYPE0"] = $type0; $msg[0]["TYPE1"] = $type1; $msg[0]["ENCODING"] = $encoding; @@ -69,6 +85,9 @@ $msg[0]["BODY"][$p] = $body[$q]; } } + } else if ($type0 == "image") { + $msg[0]["PRIORITY"] == 5; + $msg[0]["BODY"][0] = $body; } else { $msg[0]["BODY"][0] = "This attachment is of an unknown format: $type0/$type1"; } @@ -125,7 +144,12 @@ $pos = count($body); if ($message["ENTITIES"][$i]["TYPE0"] != "text") { if ($message["ENTITIES"][$i]["TYPE0"] == "image") { - $body[$pos] = "   Image: " . strtoupper($message["ENTITIES"][$i]["TYPE1"]) . "
"; + $body[$pos] = "   Image: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "
"; + +/* $file = fopen("../data/tmp.png", "w"); + fwrite($file, base64_decode($message["ENTITIES"][$i]["BODY"][0])); + fclose($file); +*/ } else { $body[$pos] = "   Unknown Type: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "
"; }