Updated the README, also made images load quicker
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 27 Dec 1999 14:52:40 +0000 (14:52 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 27 Dec 1999 14:52:40 +0000 (14:52 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@92 7612ce4b-ef26-0410-bec9-ea0150e637f0

README
config/config.php
functions/mime.php

diff --git a/README b/README
index a66c232341ba04e7de761164c46d497ce3f923e4..5a21458af86edee906708ac5ae0dd64881393e3f 100644 (file)
--- a/README
+++ b/README
-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
index 753fb61d20a3337d7900fa144b1cb879d4f5cc38..3a297977148fe6b5f33fb659544cc0ebace7ba30 100644 (file)
     $org_title = "OM-USA WebMail";
 
 //  The server that your imap server is on
     $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
     $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)
 
 //  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
     $smtpPort = 25;
 
 //  This is displayed right after they log in
index 4347fd50880dd942c796d8d3d684313703649e3f..f00754a9811eca5dfd50dac4ead53f17dd03c82f 100644 (file)
@@ -6,7 +6,7 @@
 
 
    function decodeMime($body, $bound, $type0, $type1) {
 
 
    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;
       if ($type0 == "multipart") {
          if ($body[0] == "")
             $i = 1;
                $j = $i + 1;
                $p = 0;
 
                $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++;
                }
                   $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);
                $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) {
 
    /** 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]["TYPE0"] = $type0;
       $msg[0]["TYPE1"] = $type1;
       $msg[0]["ENCODING"] = $encoding;
@@ -69,6 +85,9 @@
                $msg[0]["BODY"][$p] = $body[$q];
             }
          }
                $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>";
       }
       } 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") {
          $pos = count($body);
          if ($message["ENTITIES"][$i]["TYPE0"] != "text") {
             if ($message["ENTITIES"][$i]["TYPE0"] == "image") {
-               $body[$pos] = "<TT>&nbsp;&nbsp;&nbsp;Image: " . strtoupper($message["ENTITIES"][$i]["TYPE1"]) . "</TT><BR>";
+               $body[$pos] = "<TT>&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;Unknown Type: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "</TT><BR>";
             }
             } else {
                $body[$pos] = "<TT>&nbsp;&nbsp;&nbsp;Unknown Type: " . $message["ENTITIES"][$i]["TYPE0"] . "/" . $message["ENTITIES"][$i]["TYPE1"] . "</TT><BR>";
             }