Open lamigne opened 3 months ago
I'm troubleshooting an issue with iCloud and Freescout which is also using this module.
Some messages, not all, do not get the body fetched as part of the IMAP transaction, and it seems to be a known issue with iCloud. The workaround is to use BODY[TEXT]
instead of RFC822.TEXT
.
I don't see a variable in this module to alter the IMAP command used, so my fix was to change :
return $this->fetch(["$rfc.TEXT"], is_array($uids) ? $uids : [$uids], null, $uid);
to
return $this->fetch(["BODY[TEXT]"], is_array($uids) ? $uids : [$uids], null, $uid);
Describe the bug When fetching a Message object from a icloud imap server, the message body part is empty, while the headers loads totally fine. The Structure raw property is "" and parts is []
Used config imap server : icloud composer "webklex/php-imap": "dev-master#6d999438d29ed0bb920cd897b200a3a5fd6b6380" (to avoid composer requirements and other libraries check, #498 )
Code to Reproduce The troubling code section which produces the reported bug.
Expected behavior $message->getStructure() should return a correct raw value with parsed parts array.
Desktop / Server (please complete the following information):
Additional context Only the body parts are empty, all the other features tested are working. The package works fine when used with google (with OAuth2 of course)
As a temporary solution i use Ddeboer/imap for this icloud mailbox as it is not requiring OAuth token (yet)