php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Email HTML body does not appear when email has been moved in Outlook

Open JuanAdamuz opened this issue 4 years ago • 1 comments

Describe the bug I've tested several ways to have outlook move my emails upon receiving so ESET antivirus can analyze them before i show them in Web.

When I receive an email to INBOX folder, the method "getHTMLBody" gets the correct data. If I set a rule to move all incoming mails to another folder in outlook, the method "getHTMLBody" in all emails of the new folder is "null". If I set the same rule on RoundCube website, the method "getHTMLBody" gets the correct data.

So the problem seems to be with Outlook rules and moving emails manually... but... What is the solution? The structure in php seems correct.

MYOc6I8Z08

Code to Reproduce The troubling code section which produces the reported bug.

 $client = Client::account('mail');

$client->connect();

$folder = $client->getFolder("INBOX_REDIRECTED");

$message = $folder->query()->setFetchBody(true)->getMessageByUid(1);

$body = $message->getHTMLBody();

Expected behavior The variable "$body" contains valid html data and if I move mail in outlook, variable is null (Only text body is available).

Desktop / Server (please complete the following information):

  • OS: Windows 10 (testing)
  • PHP: [7.4]
  • Version [v2.5.0]

JuanAdamuz avatar Mar 22 '21 16:03 JuanAdamuz

Are you using the Outlook software installed in your computer? If so, there is a synchronization time between the modifications on the heavy client installed on the computer, and the Outlook server. I had this problem. To find the message in a moved folder, I had to synchronize my folders: send / receive button.

MouMoutMan avatar Apr 10 '21 12:04 MouMoutMan