added documentation
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Dec 1999 19:14:32 +0000 (19:14 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Dec 1999 19:14:32 +0000 (19:14 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@77 7612ce4b-ef26-0410-bec9-ea0150e637f0

doc/message_array.doc [new file with mode: 0644]
functions/mime.php

diff --git a/doc/message_array.doc b/doc/message_array.doc
new file mode 100644 (file)
index 0000000..2b9cc0e
--- /dev/null
@@ -0,0 +1,72 @@
+Here is a map of the message array that contains all the information about
+a message.  A single part message is handled the same as a multipart message,
+except in the "ENTITIES" part, there would only be one entry (0).
+
+$message     ["HEADER"]                      (array)
+                  ["TO"]                     (array)
+                  ["CC"]                     (array)
+                  ["SUBJECT"]                (string)
+                  ["FROM"]                   (string)
+                  ["REPLYTO"]                (string)
+                  ["MAILER"]                 (string)
+                  ["TYPE0"]                  (string)
+                  ["TYPE1"]                  (string)
+                  ["BOUNDARY"]               (string)
+                  ["CHARSET"]                (string)
+
+             ["ENTITIES"]                    (array)
+                  [0]                        (array)
+                     ["TYPE0"]               (string)
+                     ["TYPE1"]               (string)
+                     ["CHARSET"]             (string)
+                     ["BOUNDARY"]            (string)
+                     ["PRIORITY"]            (integer)
+                     ["BODY"]                (array of strings)
+
+                 [1]                         (array)
+                     ["TYPE0"]               (string)
+                     ["TYPE1"]               (string)
+                     ["CHARSET"]             (string)
+                     ["BOUNDARY"]            (string)
+                     ["PRIORITY"]            (integer)
+                     ["BODY"]                (array of strings)
+             .
+             .
+             .
+
+
+Example message:
+----------------------------------------------------------------------
+$message     ["HEADER"]
+                  ["TO"]                     "luke@usa.om.org,"
+                                             "nathan@usa.om.org"
+                  ["CC"]                     "matt@usa.om.org"
+                  ["SUBJECT"]                "hey there.. just testing"
+                  ["FROM"]                   "typist@usa.om.org"
+                  ["REPLYTO"]                ""
+                  ["MAILER"]                 "SquirrelMail v0.0.1"
+                  ["TYPE0"]                  "multipart"
+                  ["TYPE1"]                  "alternative"
+                  ["BOUNDARY"]               "--blkjoaiu2093ojv0q9"
+                  ["CHARSET"]                "us-ascii"
+
+             ["ENTITIES"]
+                  [0]
+                     ["TYPE0"]               "text"
+                     ["TYPE1"]               "plain"
+                     ["CHARSET"]             "us-ascii"
+                     ["BOUNDARY"]            ""
+                     ["PRIORITY"]            10
+                     ["BODY"]                "This is just a test to see"
+                                             "how this will handle a message"
+                                             "for this example"
+
+                 [1]
+                     ["TYPE0"]               "text"
+                     ["TYPE1"]               "html"
+                     ["CHARSET"]             "us-ascii"
+                     ["BOUNDARY"]            ""
+                     ["PRIORITY"]            20
+                     ["BODY"]                "<B>This is just a test to see</B><BR>"
+                                             "<FONT FACE="Arial,Helvetica">how this will handle a message"
+                                             "for this example</FONT>"
\ No newline at end of file
index b1a9293..aabd9cd 100644 (file)
                $body[$q] = "$body[$q]\n"; // maybe should be \n.. dunno
             }
          }
+         for ($q=0;$q < count($body);$q++) {
+            $body[$q] = ereg_replace("=3D", "=", $body[$q]);
+         }
          $newbody = $body;
       } else {
          $newbody = $body;