@@ -432,7 +432,6 @@ protected function processStructure($structure, $partIdentifier = null)
432
432
$ attachment = new Attachment ($ this , $ structure , $ partIdentifier );
433
433
$ this ->attachments [] = $ attachment ;
434
434
} elseif ($ structure ->type == 0 || $ structure ->type == 1 ) {
435
-
436
435
$ messageBody = isset ($ partIdentifier ) ?
437
436
imap_fetchbody ($ this ->imapStream , $ this ->uid , $ partIdentifier , FT_UID )
438
437
: imap_body ($ this ->imapStream , $ this ->uid , FT_UID );
@@ -442,7 +441,7 @@ protected function processStructure($structure, $partIdentifier = null)
442
441
if (!empty ($ parameters ['charset ' ]) && $ parameters ['charset ' ] !== self ::$ charset )
443
442
$ messageBody = iconv ($ parameters ['charset ' ], self ::$ charset , $ messageBody );
444
443
445
- if (strtolower ($ structure ->subtype ) == 'plain ' || $ structure ->type == 1 ) {
444
+ if (strtolower ($ structure ->subtype ) === 'plain ' || ( $ structure ->type == 1 && strtolower ( $ structure -> subtype ) !== ' alternative ' ) ) {
446
445
if (isset ($ this ->plaintextMessage )) {
447
446
$ this ->plaintextMessage .= PHP_EOL . PHP_EOL ;
448
447
} else {
@@ -451,7 +450,6 @@ protected function processStructure($structure, $partIdentifier = null)
451
450
452
451
$ this ->plaintextMessage .= trim ($ messageBody );
453
452
} else {
454
-
455
453
if (isset ($ this ->htmlMessage )) {
456
454
$ this ->htmlMessage .= '<br><br> ' ;
457
455
} else {
0 commit comments