made $sent_folder global so that the 'from' column would now be named 'to'
[squirrelmail.git] / functions / imap_messages.php
index 98449ad9e079b567580e442a0dd9fd2b9f538364..a28dc43da6ba7af74eedb7da50b0aee947c473d8 100755 (executable)
             if (strpos(strtolower(trim($line)), "charset=")) {
                $pos = strpos($line, "charset=") + 8;
                $charset = trim($line);
-               if (strpos($line, " ", $pos) > 0) {
-                  $charset = substr($charset, $pos, strpos($line, " ", $pos));
+               if (strpos($line, ";", $pos) > 0) {
+                  $charset = substr($charset, $pos, strpos($line, ";", $pos)-$pos);
                } else {
                   $charset = substr($charset, $pos);
                }