Only show text/plain if show_html_default=0
[squirrelmail.git] / class / mime.class.php
index a28846920be2f665bf977cbb8194f1e7ad7e49a1..df8e0a75f32ba39927036319892d50ede0989ab8 100644 (file)
@@ -60,7 +60,8 @@ class rfc822_header
             {
                 $field = substr($line,0,$pos);
                 $value = trim(substr($line,$pos+1));
-                if(!preg_match('/^X.*/i',$field)) {
+                if(!preg_match('/^X.*/i',$field) &&
+                   !preg_match('/^Subject/i', $field)) {
                     $value = $this->stripComments($value);
                 }
                 $this->parseField($field,$value);
@@ -114,7 +115,7 @@ class rfc822_header
           $i++;    
        }
         return $s;
-    }     
+    }
     
     function parseField($field,$value)
     {
@@ -173,9 +174,6 @@ class rfc822_header
        case ('x-mailer'):
            $this->xmailer = $value;
            break;
-       case ('user-agent'):
-           $this->xmailer = $value;
-           break;
        case ('x-priority'):
            $this->priority = $value;
            break;
@@ -1750,4 +1748,4 @@ class content_type
     }
 }
 
-?>
\ No newline at end of file
+?>