fixed the problem with no attachments
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 13 Mar 2000 12:04:39 +0000 (12:04 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 13 Mar 2000 12:04:39 +0000 (12:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@299 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_messages.php

index 58a22869b5d97e5d4d15f5f2dbd547ca5b6806e5..c219b80d8f023333be8cb71f8935438c03415cfa 100755 (executable)
     ******************************************************************************/
    function sqimap_get_header ($imap_stream, $read) {
       $i = 0;
+      // Set up some defaults
+      $header["TYPE0"] = "text";
+      $header["TYPE1"] = "plain";
+      $header["CHARSET"] = "us-ascii";
+
       while ($i < count($read)) {
-         // Set up some defaults
-         $header["TYPE0"] = "text";
-         $header["TYPE1"] = "plain";
-         $header["CHARSET"] = "us-ascii";
-         
          if (substr($read[$i], 0, 17) == "MIME-Version: 1.0") {
             $header["MIME"] = true;
             $i++;
          }
 
          /** CONTENT-TYPE **/
-         else if (substr($read[$i], 0, 13) == "Content-Type:") {
+         else if (strtolower(substr($read[$i], 0, 13)) == "content-type:") {
             $cont = strtolower(trim(substr($read[$i], 13)));
             if (strpos($cont, ";"))
                $cont = substr($cont, 0, strpos($cont, ";"));
                $header["TYPE0"] = $cont;
             }
 
+
             $line = $read[$i];
             $i++;
             while ( (substr(substr($read[$i], 0, strpos($read[$i], " ")), -1) != ":") && (trim($read[$i]) != "") && (trim($read[$i]) != ")")) {