@@ -666,7 +666,7 @@ private function fetchStructure($structure, $partNumber = null) {
666666 ($ structure ->ifdisposition == 1 && !isset ($ structure ->parts ) && $ partNumber != null )
667667 )
668668 ) {
669- if ($ structure ->subtype == "PLAIN " || $ structure ->subtype == "CSV " ) {
669+ if (strtolower ( $ structure ->subtype ) == "plain " || strtolower ( $ structure ->subtype ) == "csv " ) {
670670 if (!$ partNumber ) {
671671 $ partNumber = 1 ;
672672 }
@@ -699,7 +699,7 @@ private function fetchStructure($structure, $partNumber = null) {
699699
700700 $ this ->fetchAttachment ($ structure , $ partNumber );
701701
702- } elseif ($ structure ->subtype == "HTML " ) {
702+ } elseif (strtolower ( $ structure ->subtype ) == "html " ) {
703703 if (!$ partNumber ) {
704704 $ partNumber = 1 ;
705705 }
@@ -717,7 +717,7 @@ private function fetchStructure($structure, $partNumber = null) {
717717 $ body ->content = $ content ;
718718
719719 $ this ->bodies ['html ' ] = $ body ;
720- } elseif ($ structure ->disposition == 'attachment ' ) {
720+ } elseif (strtolower ( $ structure ->disposition ) == 'attachment ' ) {
721721 if ($ this ->getFetchAttachmentOption () === true ) {
722722 $ this ->fetchAttachment ($ structure , $ partNumber );
723723 }
@@ -870,7 +870,7 @@ public function convertEncoding($str, $from = "ISO-8859-2", $to = "UTF-8") {
870870
871871 $ from = EncodingAliases::get ($ from );
872872 $ to = EncodingAliases::get ($ to );
873-
873+
874874 if ($ from === $ to ) {
875875 return $ str ;
876876 }
@@ -1130,7 +1130,7 @@ public function getFetchBodyOption() {
11301130 public function getFetchAttachmentOption () {
11311131 return $ this ->fetch_attachment ;
11321132 }
1133-
1133+
11341134 /**
11351135 * @return boolean
11361136 */
@@ -1144,7 +1144,7 @@ public function getFetchFlagsOption() {
11441144 public function getBodies () {
11451145 return $ this ->bodies ;
11461146 }
1147-
1147+
11481148 /**
11491149 * @return FlagCollection
11501150 */
0 commit comments