فهرست منبع

added documentation

Luke Ehresman 25 سال پیش
والد
کامیت
6b9203e94b
2فایلهای تغییر یافته به همراه75 افزوده شده و 0 حذف شده
  1. 72 0
      doc/message_array.doc
  2. 3 0
      functions/mime.php

+ 72 - 0
doc/message_array.doc

@@ -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>"

+ 3 - 0
functions/mime.php

@@ -125,6 +125,9 @@
                $body[$q] = "$body[$q]\n"; // maybe should be \n.. dunno
                $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;
          $newbody = $body;
       } else {
       } else {
          $newbody = $body;
          $newbody = $body;