Skip to content

Commit ce3e2aa

Browse files
authored
fixing issue text attachment overwrite mail body
Case: When sending a mail with text file attachment, and mail body is also plain text, then the mail body gets overwritten by text file content.
1 parent b9f50bc commit ce3e2aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IMAP/Message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ private function parseBody() {
314314
* @param mixed $partNumber
315315
*/
316316
private function fetchStructure($structure, $partNumber = null) {
317-
if ($structure->type == self::TYPE_TEXT) {
317+
if ($structure->type == self::TYPE_TEXT && $structure->ifdisposition == 0) {
318318
if ($structure->subtype == "PLAIN") {
319319
if (!$partNumber) {
320320
$partNumber = 1;

0 commit comments

Comments
 (0)