summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/lib/mime.inc2
-rw-r--r--program/steps/mail/func.inc12
2 files changed, 13 insertions, 1 deletions
diff --git a/program/lib/mime.inc b/program/lib/mime.inc
index ad6561ed7..75c2d40d9 100644
--- a/program/lib/mime.inc
+++ b/program/lib/mime.inc
@@ -108,7 +108,7 @@ function iml_GetPartArray($a, $part){
}
//echo "s - part: $part rest: $rest array: ".implode(" ", $a)."<br>\n";
if (is_array($a[$part-1])) return $a[$part-1];
- else return false;
+ else return $a;
}else if (($part==0) || (empty($part))){
return $a;
}
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 9bda8906d..5e91d162f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -1004,6 +1004,18 @@ function rcmail_parse_message(&$structure, $arg=array(), $recursive=FALSE)
}
}
+ // message is single part non-text
+ else
+ {
+ if (($fname = $structure->d_parameters['filename']) ||
+ ($fname = $structure->ctype_parameters['name']) ||
+ ($fname = $structure->headers['content-description']))
+ {
+ $structure->filename = rcube_imap::decode_mime_string($fname);
+ $a_attachments[] = $structure;
+ }
+ }
+
return array($a_return_parts, $a_attachments);
}