Repository: barbushin/php-imap

Issue #128: Buggy imap_search/encoding on Microsoft Exchange/Office365
Created: 2016-02-19T13:32:48Z
Hi
I have found some kind of issue. Tested on Office365 and local Microsoft Exchange server.
If serverEncoding is sent as an empty string when creating the object, the imap_search would fail and return empty array. The string would look like this: imap_search(Resource id #72, FROM "mail@address.com", SE_UID, ); - with a comma and no encoding at the end.
In some weird way, the imap_search criteria "ALL" seems to work in this case, but no other criteria-parameters.
Also if I don't send any encoding parameter at all, UTF-8 would be set as default. I don't know why or what kind of encoding is used by Microsoft - but UTF-8 has the same problem, criteria "ALL" work, but no other criterias.
If I just remove ", $this->serverEncoding" on line 174, all imap_search criterias works.
Suggested solution: Don't set any server encoding as default and/or check if server-encoding parameter is empty.

Duplicate issue #200: Treat boundaries with missing Content-Disposition header as body if no body is present
Created: 2017-10-09T16:24:43Z
Certain mail-servers (Exchange being a good example), when sending emails with attachments, the mail body will for sure be it's own boundary, but without any Content-Disposition header for the boundary, just the Content-Type, Content-ID and Content-Transfer-Encoding header.
What happens in literally every mail client is is that in case an email is received, only containing boundaries and no actual "message body", the client will treat the boundary without a defined Content-Definition as the body (It also happens to be the first boundary in an email). This allows the client to show the mail body, and any attachment (inline or attachment according to the Content-Disposition header).
However php-imap decides to treat everything as an actual attachment, thus the email body missing (being text/plain or text/HTML).
Ideally php-imap should be aware that if there's no message body, and there's a boundary defined without a Content-Disposition header, the Content-Type being text/plain or text/html.
Email sent in Plain text with an attachment will show up as following in the mail-source, php-imap cannot parse this email and get the correct body.
If you send an email with an attachment where the boundary for the body uses Content-Transfer-Encoding: 7bit - php-imap seems to handle it fine.
Below you'll find an example to replicate the issue:
MIME-Version: 1.0
Received: from DB6P192MB0149.EURP192.PROD.OUTLOOK.COM (10.171.114.9) by
 DB6P192MB0152.EURP192.PROD.OUTLOOK.COM (10.171.114.12) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.77.7 via Mailbox Transport; Mon, 9 Oct 2017 15:40:18 +0000
Received: from DB6P192MB0040.EURP192.PROD.OUTLOOK.COM (10.171.113.18) by
 DB6P192MB0149.EURP192.PROD.OUTLOOK.COM (10.171.114.9) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.77.7; Mon, 9 Oct 2017 15:40:17 +0000
Received: from DB6P192MB0040.EURP192.PROD.OUTLOOK.COM
 ([fe80::3918:eaa7:51ca:48a2]) by DB6P192MB0040.EURP192.PROD.OUTLOOK.COM
 ([fe80::3918:eaa7:51ca:48a2%17]) with mapi id 15.20.0077.020; Mon, 9 Oct 2017
 15:40:17 +0000
From: Lucas Rolff <lucas@lucasrolff.com>
To: General Support <support@example.com>
Subject: Test af attachment
Thread-Topic: Test af attachment
Thread-Index: AQHTQRTnSSeAPzk82kuBs2ibmSseqA==
Date: Mon, 9 Oct 2017 17:40:16 +0200
Message-ID: <A94ABE50-13ED-42D2-8919-062066C8BA3B@lucasrolff.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 04
X-MS-Exchange-Organization-AuthSource: DB6P192MB0040.EURP192.PROD.OUTLOOK.COM
X-MS-Has-Attach: yes
X-MS-Exchange-Organization-Network-Message-Id:
	c2ab56ad-397c-4b18-105e-08d50f2c0a86
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
X-MS-Exchange-Organization-RecordReviewCfmType: 0
x-ms-publictraffictype: Email
X-Microsoft-Exchange-Diagnostics:
	1;DB6P192MB0152;27:yqc0WMnz0Y7iKVwJw/Wka51T5qfCpvLUKd3xiMvq2pZYND1RuyP2c0drqXEQQ5Wb41lUT1ub7SDRBR2D9+pqf810ANYgcEGr/K6i2hfCrua83NoHFSfPnAvrTnFg6jj/
Content-Type: multipart/mixed;
	boundary="_002_A94ABE5013ED42D28919062066C8BA3Blucasrolffcom_"

--_002_A94ABE5013ED42D28919062066C8BA3Blucasrolffcom_
X-Microsoft-Exchange-Diagnostics:
	1;DB6P192MB0152;27:yqc0WMnz0Y7iKVwJw/Wka51T5qfCpvLUKd3xiMvq2pZYND1RuyP2c0drqXEQQ5Wb41lUT1ub7SDRBR2D9+pqf810ANYgcEGr/K6i2hfCrua83NoHFSfPnAvrTnFg6jj/
Content-Type: text/plain; charset="utf-8"
Content-ID: <FEA6D03C6DF3F941803043E8176004B7@EURP192.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: base64

VGVzdCBhdHRhY2htZW50Lg0KDQoNCg0K

--_002_A94ABE5013ED42D28919062066C8BA3Blucasrolffcom_
X-Microsoft-Exchange-Diagnostics:
	1;DB6P192MB0152;27:yqc0WMnz0Y7iKVwJw/Wka51T5qfCpvLUKd3xiMvq2pZYND1RuyP2c0drqXEQQ5Wb41lUT1ub7SDRBR2D9+pqf810ANYgcEGr/K6i2hfCrua83NoHFSfPnAvrTnFg6jj/
Content-Type: image/png; name="2017_10_09_co8sg790jwlfkue.png"
Content-Description: 2017_10_09_co8sg790jwlfkue.png
Content-Disposition: attachment; filename="2017_10_09_co8sg790jwlfkue.png";
	size=7274; creation-date="Mon, 09 Oct 2017 15:40:16 GMT";
	modification-date="Mon, 09 Oct 2017 15:40:16 GMT"
Content-ID: <07E1BE3DF71DDE4C8B4549536F2DA520@EURP192.PROD.OUTLOOK.COM>
Content-Transfer-Encoding: base64

iVBORw0KGgoAAAANSUhEUgAAAKgAAABDCAYAAAAIyE71AAAKxmlDQ1BJQ0MgUHJvZmlsZQAASImV
lgdUU2kWx7/30kNCC4QiJfQmXSCA9BpAQTqISkhCEkoIKYCIDRkcwbGgIoIVHRFRcFTqWBBRVBgE
GxZ0QAYVdR0siIrKPmAJO7tnd8/ec773/d7N9+679+Xec/4AkD4whcI0WBGAdIFEFB7gTYuNi6fh
BgEBKAASUANOTJZY6BUWFgIQm93/ah/vAWhqv205Fevff/+vpsTmiFkAQGEIJ7HFrHSEzyLr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R/qpHnXztBbrt6BoBmmuwcgE0XY4pN/1t0EUXXWSAZYGEd1BwTsZxBMCSDrgbe9XjQa+fgRm4
+O9nWgWQ76ipDunTiBEjrCzgRCXAzo5UDr+3ydde+hnaSTwCtLUGCk8gfC1z0dPiKWd6rrKFpiFJ
N91005x026K9QvlqzXLRFq/ejCG7PRC3mbI7NpEz9UAEaIRBpnsgAjTTwxOZiwCNGMh0D0SAZnp4
InMRoBEDme6BCNBMD09kLgI0YiDTPRABmunhicxFgEYMZLoHIkAzPTyRuf8DDMvLb7ieVY4AAAAA
SUVORK5CYII=

--_002_A94ABE5013ED42D28919062066C8BA3Blucasrolffcom_--

Expected behaviour:
Treat boundaries without content-disposition as body text if no other body can be found.

Closing comment (2019-04-29T15:19:05Z): Related to...

#128: Buggy imap_search/encoding on Microsoft Exchange/Office365
#157: Line 527 Mailbox.php | Looks to the wrong id?
#184: searchMailbox failing with office 365
#278: MS Outlook eml parsed as body instead of attachment