Browse Source

In case of messages without a plain/text part (i.e. 1 part which is
application/octet-stream then the the contenttype wasn't set?

stekkel 22 years ago
parent
commit
a9112aa208
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/download.php

+ 5 - 1
src/download.php

@@ -53,7 +53,11 @@ if ($ent_id) {
     
     if ($message->rfc822_header) {
        $subject = $message->rfc822_header->subject;
-       $charset = $header->content_type->properties['charset'];
+       if (isset($header->content_type)) {
+           $charset = $header->content_type->properties['charset'];
+       } else {
+           $charset = '';
+       }
     } else {
        $header = $message->header;
        $charset = $header->getParameter('charset');