@@ -432,7 +432,6 @@ protected function processStructure($structure, $partIdentifier = null)
432432 $ attachment = new Attachment ($ this , $ structure , $ partIdentifier );
433433 $ this ->attachments [] = $ attachment ;
434434 } elseif ($ structure ->type == 0 || $ structure ->type == 1 ) {
435-
436435 $ messageBody = isset ($ partIdentifier ) ?
437436 imap_fetchbody ($ this ->imapStream , $ this ->uid , $ partIdentifier , FT_UID )
438437 : imap_body ($ this ->imapStream , $ this ->uid , FT_UID );
@@ -442,7 +441,7 @@ protected function processStructure($structure, $partIdentifier = null)
442441 if (!empty ($ parameters ['charset ' ]) && $ parameters ['charset ' ] !== self ::$ charset )
443442 $ messageBody = iconv ($ parameters ['charset ' ], self ::$ charset , $ messageBody );
444443
445- if (strtolower ($ structure ->subtype ) == 'plain ' || $ structure ->type == 1 ) {
444+ if (strtolower ($ structure ->subtype ) === 'plain ' || ( $ structure ->type == 1 && strtolower ( $ structure -> subtype ) !== ' alternative ' ) ) {
446445 if (isset ($ this ->plaintextMessage )) {
447446 $ this ->plaintextMessage .= PHP_EOL . PHP_EOL ;
448447 } else {
@@ -451,7 +450,6 @@ protected function processStructure($structure, $partIdentifier = null)
451450
452451 $ this ->plaintextMessage .= trim ($ messageBody );
453452 } else {
454-
455453 if (isset ($ this ->htmlMessage )) {
456454 $ this ->htmlMessage .= '<br><br> ' ;
457455 } else {
0 commit comments