changed <? to <?php in everything
[squirrelmail.git] / functions / imap_messages.php
index 8604bb876c8707a8ab3121b74d64bb12665639c9..a7ac66e62873f28d981d5efa5baf3661655f7c05 100755 (executable)
@@ -1,4 +1,4 @@
-<?
+<?php
    /**
     **  imap_messages.php
     **
             }
 
             /** Detect the boundary of a multipart message **/
-            if (strpos(strtolower(trim($line)), "boundary=")) {
-               $pos = strpos(strtolower($line), "boundary=") + 9;
-               $bound = trim($line);
-               if (strpos($line, " ", $pos) > 0) {
-                  $bound = substr($bound, $pos, strpos($line, " ", $pos));
-               } else {
-                  $bound = substr($bound, $pos);
-               }
-               $bound = str_replace("\"", "", $bound);
-               $header["BOUNDARY"] = $bound;
+            if (eregi("boundary=\"([^\"]+)\"", $line, $regs)) {                             
+               $header["BOUNDARY"] = $regs[1];                                             
             }
 
             /** Detect the charset **/