diff --git a/classes/rawemailmessage.class.inc.php b/classes/rawemailmessage.class.inc.php index 9fa5a1f..27119e5 100644 --- a/classes/rawemailmessage.class.inc.php +++ b/classes/rawemailmessage.class.inc.php @@ -612,6 +612,18 @@ protected function ExtractHeadersAndRawBody($aLines) */ static protected function DecodeHeaderString($sInput) { + // Fix an encoding issue which may occur in multiline headers if it is indeed a utf-8 encoded string. + // Check if the string starts with =?utf-8? (sometimes with space in front) and ends with ?= + // This could happen also for other charsets but we weren't able to reproduce the same problem with another charset => so we're keeping UTF-8 hardcoded for now ! + if(preg_match('/^(\s|){1,}=\?utf-8\?(.*)\?=/', $sInput)) { + // Remove leading white space + $sInput = preg_replace('/^(\s)/', '', $sInput); + // Remove any space of UTF8 seperation in the lines which were merged in the ExtractHeadersAndRawBody() method + // Mind that it's possible that some lines of a multiline subject have different encodings! (utf-8-b; utf-8-q; ...) + // Examples: ?==?utf-8? , ?= =?utf-8? + $sInput = preg_replace('/\?=(\s|){1,}=\?utf-8\?/', '?==?utf-8?', $sInput); + } + $sOutput = iconv_mime_decode($sInput, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); return $sOutput; // Don't be too strict, continue on errors } diff --git a/test/TestEmlFiles.php b/test/TestEmlFiles.php index 587b59d..9ad15b5 100644 --- a/test/TestEmlFiles.php +++ b/test/TestEmlFiles.php @@ -36,10 +36,6 @@ public function testEmailMessage($sFileName, $sComment, $bToIsEmpty) $sSubject = $oEmail->GetSubject(); $this->assertNotEmpty($sSubject); - // - if (str_replace(APPROOT . 'env-production/combodo-email-synchro/test/emailsSample/','',$sFileName) == "multi_lines_header_parsing.eml"){ - $this->assertEquals( 'Re: autonet backup: nanobeam-ma15-sec-kunde.mgmt (1047) [Space.NET R-201909190397]',$sSubject); - } $aSender = $oEmail->GetSender(); $this->assertValidEmailCollection($aSender, 'Sender is valid'); @@ -71,7 +67,6 @@ public function testEmailMessage($sFileName, $sComment, $bToIsEmpty) $this->assertArrayHasKey('mimeType', $aAttachment); $this->assertArrayHasKey('content', $aAttachment); } - } private function assertEmptyCollection($aEmails, $message = '') @@ -129,12 +124,37 @@ public function EmailMessageProvider() $sTestName = basename($sFile); $aReturn[$sTestName] = array( - 'sFile' => $sFile, - 'sComment' => isset($aMetaData[$sTestName]['sComment']) ? $aMetaData[$sTestName]['sComment'] : '', + 'sFile' => $sFile, + 'sComment' => isset($aMetaData[$sTestName]['sComment']) ? $aMetaData[$sTestName]['sComment'] : '', 'bToIsEmpty' => isset($aMetaData[$sTestName]['bToIsEmpty']) ? $aMetaData[$sTestName]['bToIsEmpty'] : false, ); } return $aReturn; } + + /** + * @dataProvider MultilineLongSubjectsProvider + */ + public function testMultilineLongSubjects($sEmailFilename, $sSubjectExpectedValue): void + { + $sEmlFilePath = APPROOT.'env-production/combodo-email-synchro/test/emailsSample/'.$sEmailFilename; + $this->assertFileExists($sEmlFilePath, 'EML file is not existing'); + + $oEmail = RawEmailMessage::FromFile($sEmlFilePath); + $sSubjectActualValue = $oEmail->GetSubject(); + $this->assertSame($sSubjectExpectedValue, $sSubjectActualValue, "File `{$sEmailFilename}` : decoded subject has a wrong value"); + } + + public function MultilineLongSubjectsProvider(): array + { + return [ + ['multi_lines_header_parsing.eml', 'Re: autonet backup: nanobeam-ma15-sec-kunde.mgmt (1047) [Space.NET R-201909190397]'], + ['email_133_kb4170_multiple_lines_encoded_data.eml', 'FW: ⚠ This is a test with an emoji in the subject and a long subject message which will cause multi line subjects and encoding'], + ['email_065.eml', 'Re: iTop - Enhancement request - Classes et héritage'], + ['email_077.eml', 'Vente Flash Otto Office ! Spécial High-Tech, attention stocks limités !'], + ['email_107.eml', 'Fwd: Suite entretien téléphonique de ce jour'], + ['test gmail.eml', 'Test de mail envoyé avec Gmail et contenant un très très long sujet avec d\'aillleurs aussi des caractères accentués histoire de voir ce qui se passe dans ce cas là. Je sais c\'est un peu exagéré, enfin à peine...'], + ]; + } } diff --git a/test/emailsSample/email_133_kb4170_multiple_lines_encoded_data.eml b/test/emailsSample/email_133_kb4170_multiple_lines_encoded_data.eml new file mode 100644 index 0000000..3f6f9e3 --- /dev/null +++ b/test/emailsSample/email_133_kb4170_multiple_lines_encoded_data.eml @@ -0,0 +1,194 @@ +Received: from DB3PR0202MB3497.eurprd02.prod.outlook.com (2603:10a6:8:5::27) + by AM9PR02MB6595.eurprd02.prod.outlook.com with HTTPS; Sat, 17 Jul 2021 + 08:50:16 +0000 +Received: from DBBPR09CA0036.eurprd09.prod.outlook.com (2603:10a6:10:d4::24) + by DB3PR0202MB3497.eurprd02.prod.outlook.com (2603:10a6:8:5::27) with + Microsoft SMTP Server (version=TLS1_2, + cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Sat, 17 Jul + 2021 08:50:15 +0000 +Received: from DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com + (2603:10a6:10:d4:cafe::cb) by DBBPR09CA0036.outlook.office365.com + (2603:10a6:10:d4::24) with Microsoft SMTP Server (version=TLS1_2, + cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend + Transport; Sat, 17 Jul 2021 08:50:15 +0000 +Received: from EUR03-VE1-obe.outbound.protection.outlook.com (40.92.72.92) by + DB5EUR03FT053.mail.protection.outlook.com (10.152.21.119) with Microsoft SMTP + Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id + 15.20.4331.21 via Frontend Transport; Sat, 17 Jul 2021 08:50:15 +0000 +Received: from AM9PR02MB6595.eurprd02.prod.outlook.com (2603:10a6:20b:2c8::23) + by AM9PR02MB6753.eurprd02.prod.outlook.com (2603:10a6:20b:2c6::14) with + Microsoft SMTP Server (version=TLS1_2, + cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.23; Sat, 17 Jul + 2021 08:50:15 +0000 +Received: from AM9PR02MB6595.eurprd02.prod.outlook.com + ([fe80::aca0:a91f:91e5:6368]) by AM9PR02MB6595.eurprd02.prod.outlook.com + ([fe80::aca0:a91f:91e5:6368%4]) with mapi id 15.20.4331.021; Sat, 17 Jul 2021 + 08:50:15 +0000 +From: Jeffrey Bostoen +To: Jeffrey Bostoen +Subject: + =?utf-8?B?Rlc6IOKaoCBUaGlzIGlzIGEgdGVzdCB3aXRoIGFuIGVtb2ppIGluIHRoZSBz?= + =?utf-8?B?dWJqZWN0IGFuZCBhIGxvbmcgc3ViamVjdCBtZXNzYWdlIHdoaWNoIHdpbGwg?= + =?utf-8?Q?cause_multi_line_subjects_and_encoding?= +Thread-Topic: + =?utf-8?B?4pqgIFRoaXMgaXMgYSB0ZXN0IHdpdGggYW4gZW1vamkgaW4gdGhlIHN1Ympl?= + =?utf-8?B?Y3QgYW5kIGEgbG9uZyBzdWJqZWN0IG1lc3NhZ2Ugd2hpY2ggd2lsbCBjYXVz?= + =?utf-8?Q?e_multi_line_subjects_and_encoding?= +Thread-Index: Add66Lz27pXF+0kbR2eqDdtHTwhijQ== +X-MS-Exchange-MessageSentRepresentingType: 1 +Date: Sat, 17 Jul 2021 08:50:15 +0000 +Message-ID: + +Accept-Language: en-US +Content-Language: en-US +X-MS-Exchange-Organization-AuthAs: Anonymous +X-MS-Exchange-Organization-AuthSource: + DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com +X-MS-Has-Attach: +X-MS-Exchange-Organization-Network-Message-Id: + 4be8244d-5fbc-4542-d46b-08d948ffe5cb +X-MS-Exchange-Organization-SCL: -1 +X-MS-Exchange-Organization-PCL: 2 +X-MS-TNEF-Correlator: +X-MS-Exchange-Organization-RecordReviewCfmType: 0 +received-spf: Pass (protection.outlook.com: domain of outlook.com designates + 40.92.72.92 as permitted sender) receiver=protection.outlook.com; + client-ip=40.92.72.92; helo=EUR03-VE1-obe.outbound.protection.outlook.com; +x-ms-publictraffictype: Email +authentication-results: spf=pass (sender IP is 40.92.72.92) + smtp.mailfrom=outlook.com; outlook.com; dkim=pass (signature was verified) + header.d=outlook.com;outlook.com; dmarc=pass action=none + header.from=outlook.com;compauth=pass reason=100 +x-ms-traffictypediagnostic: AM9PR02MB6753:|DB3PR0202MB3497: +x-ms-office365-filtering-correlation-id: 4be8244d-5fbc-4542-d46b-08d948ffe5cb +x-microsoft-antispam: BCL:0; +dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; + s=selector1; + h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; + bh=mspojGaONsq902WbV1dQkLi61Jr9QSSvKY60AaXuLTo=; + b=i4c8oK+yTOVtEN8JBkwonO6Jz1zNi2lCWd/55AtNM16kJ+Wa8bYInJsQXkKrlKT1q/qouXvJ32G2l18SRHncA9doCACzodaa7MXcJM/sospSjsCv+aJY31GlEdoCot+8FXqnzhlJKmellrWSEen6e17zUosE8tsx+XpOZGsmgsnWNqQM+DbvKyMg/qguEnsYdVGHgbVXD4LaS8rxwePP9AdZotA6CkeRIt24wb8xHbsxu4FGpAeXVVmJ6+APHHP0p4c4gy3Wm8I/CEP8mhaJuSCBSYXjYlx/h7AfT4/58ZH00rCFgq8bJnLOosjLqC5BubgkARt+6nR6Kii3ER11pg== +arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; + b=QZGy2tiY7WJYbcXjdlB7F2qBV9CZ+zJdBnZzj3qyL4mHbLWnZF7cpwj1y4P4TfNKDYoOMLzNwKyPJat1pWp53hTvtu+yNB3kNuu3Jfe0eT9fUuFSWRUjdn+v7sdVGFfWsDOFhWNLV3kEkd8iqa2fAS6gp4QBoCce3CTsg/L/zL5x/jNPg9xDwQ5687idhlBXhFBMTijv4PwFLEtQWmAcr0+b02BgMdohLLuEIRTnvI8C/PE1Bab0B1oHIuXevpsd9EDka/KsJ9EsaTxVblfrNzBwefYSgMi8+SLL57IBZoaKmFHunhGyv/8BdIApRPEs3RIfK2NUi0azNN2xDSQCVg== +arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; + s=arcselector9901; + h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; + bh=mspojGaONsq902WbV1dQkLi61Jr9QSSvKY60AaXuLTo=; + b=lyH2zb57kZNoayfxaaDltoCBfblTMtLjDlVFMTSH+YPzELLSCyCWF8IM+3kcAArcRka/JVE5xmzkpe5gRfiaiTMqqfQ01zPKSwqmR/CaNS/AP/xW/M29Bqt9zEFvKMc7afmHdKrrwyUrzc6/CMSbD66kdi8ld4uYC4DtYWBt0fDI8FzZLOqmmgoxEzrQokm9+hgL8m8+tqAjnKxqbr33FZBdEmHwYW1HDHcM5f/chaqDopKTjeLd0KirYAX4zRPJuIoqrc73qLPtLInlB7K/j2SXeW8d72aIr/TBaildM1rGgdTrQRVlWu8G1EsI4G+i00fPNMmCEEsBPpeBvHr5Sg== +arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; + dkim=none; arc=none +x-incomingtopheadermarker: + OriginalChecksum:A96AD7D2022476EF961C4282BE21E36BEA2BD06C46E27FFBC59610BA4A9B1B0C;UpperCasedChecksum:283449498150FF2E4E1E7B15F9DD0162FB1D71220C11312CECA6811C4C237384;SizeAsReceived:5742;Count:39 +x-tmn: + [OMEt7oPA69SRnbkhgllIM0tC3985XvwqKrKLRR1r0+hZNnsyRXLazITMUzhOcNbtg7Drft9omUQ=] +x-incomingheadercount: 39 +x-eopattributedmessage: 0 +x-microsoft-antispam-message-info: + qanjKyCfCofkS5dtt6yFCfQLLfPUntrA1RgtL6hl07681qUWanZmjp4LuN4DQWwfEpJ1b7Ki0+yLxzFoTH6eIBbjGylrN2r1p9TrWnaWaeBgi15ihsdf+E9FKuLaDy7FV9zQUJ/oECk4hGaqjlmywFurN1/v8IO+hA9+Enf/VhT8pjIHl52WwMUri6vc2iBevME6CAwpCKAfJAlKJdf/jxwvfTwub6fqM3STHFR5mY8F3SiBywv3BPoZ/Ro72RWojMrgIW7Ri7HHP1YhsNK+nLO90SSxoE8uwBLz4znyJF7nGgKSnkg3Ct0TU0Rsq0Ezkau6B8rBADETgQtwjYuJYErUpUETlzznepEVGxtur1sf9FojL6zslayFVK7GoyWWHp67QxRVnzxoJL1L7kz9fYjb/71K8yU0imz8uS3GW0N/WggW+c+Izxor1upNwvES +x-ms-exchange-transport-forked: True +x-ms-exchange-crosstenant-rms-persistedconsumerorg: + 00000000-0000-0000-0000-000000000000 +x-ms-exchange-crosstenant-network-message-id: + 4be8244d-5fbc-4542-d46b-08d948ffe5cb +x-ms-exchange-crosstenant-originalarrivaltime: 17 Jul 2021 08:50:15.8033 (UTC) +x-ms-exchange-crosstenant-fromentityheader: Internet +x-ms-exchange-crosstenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa +x-ms-exchange-transport-crosstenantheadersstamped: DB3PR0202MB3497 +x-microsoft-antispam-untrusted: BCL:0; +x-microsoft-antispam-message-info-original: + qanjKyCfCofkS5dtt6yFCfQLLfPUntrA1RgtL6hl07681qUWanZmjp4LuN4DQWwfEpJ1b7Ki0+yLxzFoTH6eIBbjGylrN2r1p9TrWnaWaeBgi15ihsdf+E9FKuLaDy7FV9zQUJ/oECk4hGaqjlmywFurN1/v8IO+hA9+Enf/VhT8pjIHl52WwMUri6vc2iBevME6CAwpCKAfJAlKJdf/jxwvfTwub6fqM3STHFR5mY8F3SiBywv3BPoZ/Ro72RWojMrgIW7Ri7HHP1YhsNK+nLO90SSxoE8uwBLz4znyJF7nGgKSnkg3Ct0TU0Rsq0Ezkau6B8rBADETgQtwjYuJYErUpUETlzznepEVGxtur1sf9FojL6zslayFVK7GoyWWHp67QxRVnzxoJL1L7kz9fYjb/71K8yU0imz8uS3GW0N/WggW+c+Izxor1upNwvES +x-eoptenantattributedmessage: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa:0 +x-ms-exchange-transport-crosstenantheadersstripped: + DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com +x-ms-exchange-transport-crosstenantheaderspromoted: + DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com +x-ms-office365-filtering-correlation-id-prvs: + c8cc0d18-4814-4f4e-6695-08d948ffe55f +x-ms-exchange-crosstenant-authsource: + DB5EUR03FT053.eop-EUR03.prod.protection.outlook.com +x-ms-exchange-crosstenant-authas: Anonymous +x-ms-exchange-slblob-mailprops: + 79Jo46q8hhDyTo9P99hRQAQ3TG/q6CYJf2dXUHgPxhw5xFlpSmqJC8wUeSrekrU8DDIi3vzhSqXfeINCEzIM6uLn8G1c0L34Q6fAuTRwufNl6eq7FX2JxXAu5dwXTGDBCq6YVzLJU49nwMsarBnBK544bmPfWTwYZvQYKll5d5+SkUtp2IG4O+kp9apkPS2FpXfzuNXqordYzucgThu8AhlD8mfSdrCo+4Fl9sTTqzLnwtWbGTfP3JRsHRXjTN1rGUEQvUFkQup1a01Oee0fGvIxuDOkua4k+wIFI9cfPQHkxmWv+4CRUv/MD23lWRPzYJvldH1UczWlAf9lZ+IyW0p8ozoZ8LEaG8McRSMqzlA/0T/OJqJpNpReFgKCZCUsJXYUWGVAURuHCqVKyYnmQEMoHmAcjnWG+2JHRrNkpVSGrB5vAffGQz/GFBk/XahlqzOH4Nv/cFQvikhqIgGeebD3jDocphMmdm35gK6DM6apvvOqAKk5Bm0P1wtoApOvo+4kUTW+AznV+sTX7pFsn0rLt/BMEzLKedljqawkg3StPPhq9HwMF9l9kPMlMt4Kg5rO3c01gSEvA4YLRtFS16OqLFo2O3xdfLq7feEUZuwb7JWfqsXBPshJwecJH0ZmQlH/2jSSwOOMuzAzxUJfujF9c1wY7At+P/o3oOQ485A2H/nApQteD6fuqx8/Yg1S +x-ms-exchange-transport-endtoendlatency: 00:00:00.6262636 +x-ms-exchange-processed-by-bccfoldering: 15.20.4331.021 +x-ms-exchange-antispam-messagedata-chunkcount: 1 +x-ms-exchange-antispam-messagedata-0: + pJtUE+mtq1sTHMEFg0TYjuiYhAxLcsifIYf1DfRjvESscVRBijtQnb5V+MN+rRl69EO+xP5QRwLB0CmVt6xugOLTjCyBvQpMgN8iF4giPCjYtxQ3sa7zGWVL0dPI3GWDyQzaP6I0dB1AZGEWkjlfQI4c83EqKphtfy20SEjC1s1+zpDnfXJeu2BVBSyguiGaPiPYtqLe6F50wegrNYFN1Q== +X-Microsoft-Antispam-Mailbox-Delivery: + dkl:0;rwl:0;ucf:0;jmr:0;ex:0;auth:1;dest:I;OFR:SpamFilterPass;ENG:(5062000282)(90000117)(90011020)(91015020)(91040095)(91045095)(9050020)(9060116)(9100314)(5061607266)(5061608174)(1004385)(4900115)(2008001114)(2008000189)(4920090)(6220004)(4950131)(4990090)(9110004); +X-Message-Info: + 5vMbyqxGkde5GadX+p2DKVRC3kqp4YEKtp6xwUwTfx2EBD4z0gVgwEJnEqnROXg9dqSxmrjAVFySW9dYMXxyta/ta8og7xGFmMwdx2+feSgPJ3v44XMRsBF1EOVfJjSiq5PaML3nnQz1WjI1bAvAj00oNtVmfDokGAWzuyaB2Muy3alrxMFLFY7fo39L9mRLsGu+qOZzJDw8YCB+05PxQw== +X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0xO0Q9MTtHRD0xO1NDTD0tMQ== +X-Microsoft-Antispam-Message-Info: + =?utf-8?B?bStoU1RIcVpiQU9SaVUxRFBuZDJvVDAreDBFalR3ditiVnJSTzFKemhUMEJx?= + =?utf-8?B?WWdoSko3UTJheVdhVmlYUk1rd1NSM3VlbWlrNWNGK0VyZHJCckIxVThRc0c2?= + =?utf-8?B?Z1BzUmphWG1IaTFIbk9vT0VvcWVPNGlCdStwSUJaeVhpTmpJbEt2RVRFbXhJ?= + =?utf-8?B?SFVhOFpUdllqSlFQWUZLbS9QemR5YlFKKytobmQ2ZXArRmhlbU80dHJGeDBE?= + =?utf-8?B?U0tpckRqd3N6TzJmWmZnZUU2WGVaOEk2R1ZSYmFWZ1NsYitvL0tJMkI4c2Rs?= + =?utf-8?B?NVV2bS9uTXhoSjE0RGo1dVB3cXFkVmZuMks3NVd1Q2FXOUc5alkzSitkdzhq?= + =?utf-8?B?YkVocVVvcndo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udXB6N1pEcG1t?= + =?utf-8?B?R2NUaVVsVDhoNnhYY0wyU1p0WTh2Zm8rU0hKOGp1S0pqcVdpcDBCMEc3NHY0?= + =?utf-8?B?VnJ5VDRidGJlSEgzRjhIaVRVR0RVZVIwVXhhMlYwVmVkS3VjUklVWG1yR2pm?= + =?utf-8?B?T2lwR2Z3NERwK3pFYk1Nek5SUkZydmNMcmJDUlZFLzBlNkdnNTVhelNDeHh3?= + =?utf-8?B?SEhmR2xJbXEwRTVCN21NNTVEZzlhR3oxTVczOTRnPT0=?= +Content-Type: multipart/alternative; + boundary="_000_AM9PR02MB6595D89D8644FDF29ECF88CAD8109AM9PR02MB6595eurp_" +MIME-Version: 1.0 + +--_000_AM9PR02MB6595D89D8644FDF29ECF88CAD8109AM9PR02MB6595eurp_ +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: base64 + +DQoNCktpbmQgcmVnYXJkcw0KTWV0IHZyaWVuZGVsaWprZSBncm9ldGVuDQoNCkplZmZyZXkgQm9z +dG9lbg0KDQo= + +--_000_AM9PR02MB6595D89D8644FDF29ECF88CAD8109AM9PR02MB6595eurp_ +Content-Type: text/html; charset="utf-8" +Content-Transfer-Encoding: base64 + +PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRlbnQtVHlwZSIgY29udGVudD0i +dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4NCjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29udGVu +dD0iTWljcm9zb2Z0IFdvcmQgMTUgKGZpbHRlcmVkIG1lZGl1bSkiPg0KPHN0eWxlPjwhLS0NCi8q +IEZvbnQgRGVmaW5pdGlvbnMgKi8NCkBmb250LWZhY2UNCgl7Zm9udC1mYW1pbHk6IkNhbWJyaWEg +TWF0aCI7DQoJcGFub3NlLTE6MiA0IDUgMyA1IDQgNiAzIDIgNDt9DQpAZm9udC1mYWNlDQoJe2Zv +bnQtZmFtaWx5OkNhbGlicmk7DQoJ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NCjwvaGVhZD4NCjxib2R5IGxhbmc9ImVuLUJFIiBsaW5rPSIjMDU2M0MxIiB2bGluaz0i +Izk1NEY3MiIgc3R5bGU9IndvcmQtd3JhcDpicmVhay13b3JkIj4NCjxkaXYgY2xhc3M9IldvcmRT +ZWN0aW9uMSI+DQo8cCBjbGFzcz0iTXNvTm9ybWFsIj48c3BhbiBsYW5nPSJlbi1CRSI+PG86cD4m +bmJzcDs8L286cD48L3NwYW4+PC9wPg0KPHAgY2xhc3M9Ik1zb05vcm1hbCI+PHNwYW4gbGFuZz0i +ZW4tQkUiPjxvOnA+Jm5ic3A7PC9vOnA+PC9zcGFuPjwvcD4NCjxwIGNsYXNzPSJNc29Ob3JtYWwi +PjxzcGFuIGxhbmc9Ik5MLUJFIiBzdHlsZT0iY29sb3I6YmxhY2siPktpbmQgcmVnYXJkczxvOnA+ +PC9vOnA+PC9zcGFuPjwvcD4NCjxwIGNsYXNzPSJNc29Ob3JtYWwiPjxzcGFuIGxhbmc9Ik5MLUJF +IiBzdHlsZT0iY29sb3I6YmxhY2siPk1ldCB2cmllbmRlbGlqa2UgZ3JvZXRlbjxicj4NCjxicj4N +CkplZmZyZXkgQm9zdG9lbjwvc3Bhbj48c3BhbiBsYW5nPSJOTC1CRSIgc3R5bGU9ImNvbG9yOmJs +YWNrO21zby1mYXJlYXN0LWxhbmd1YWdlOiMyMDAwIj48bzpwPjwvbzpwPjwvc3Bhbj48L3A+DQo8 +cCBjbGFzcz0iTXNvTm9ybWFsIj48c3BhbiBsYW5nPSJlbi1CRSI+PG86cD4mbmJzcDs8L286cD48 +L3NwYW4+PC9wPg0KPC9kaXY+DQo8L2JvZHk+DQo8L2h0bWw+DQo= + +--_000_AM9PR02MB6595D89D8644FDF29ECF88CAD8109AM9PR02MB6595eurp_-- diff --git a/test/emailsSample/readme.txt b/test/emailsSample/readme.txt index 8382cd5..1f71d5a 100644 --- a/test/emailsSample/readme.txt +++ b/test/emailsSample/readme.txt @@ -1,2 +1,3 @@ email_131.eml: Email with "us-ascii" charset and binary attachment. (Issue was that attachment was converted through iconv() when it should not) -email_132.eml: Email with uppercase content-transfer-encoding ("BASE64"). (Issue was that mail had "Quote-Printable" and "BASE64" instead of lowercase ones) \ No newline at end of file +email_132.eml: Email with uppercase content-transfer-encoding ("BASE64"). (Issue was that mail had "Quote-Printable" and "BASE64" instead of lowercase ones) +email_133_kb4170_multiple_lines_encoded_data.eml: Email with a multiline subject with different MIME encodings (Issue that caused white space in front of subject)