File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -431,6 +431,9 @@ private function fetchStructure($structure, $partNumber = null) {
431431 */
432432 protected function fetchAttachment ($ structure , $ partNumber ){
433433 switch ($ structure ->type ) {
434+ case self ::TYPE_MESSAGE :
435+ $ type = 'message ' ;
436+ break ;
434437 case self ::TYPE_APPLICATION :
435438 $ type = 'application ' ;
436439 break ;
@@ -476,6 +479,13 @@ protected function fetchAttachment($structure, $partNumber){
476479 }
477480 }
478481 }
482+ if (self ::TYPE_MESSAGE == $ structure ->type ) {
483+ if ($ structure ->ifdescription ) {
484+ $ attachment ->name = $ structure ->description ;
485+ } else {
486+ $ attachment ->name = $ structure ->subtype ;
487+ }
488+ }
479489
480490 if (!$ attachment ->name && property_exists ($ structure , 'parameters ' )) {
481491 foreach ($ structure ->parameters as $ parameter ) {
You can’t perform that action at this time.
0 commit comments