Closed afawaz2 closed 1 year ago
Np. hopefully it stays fixed.
Thanks for the solution. We've updated the instruction: https://github.com/freescout-helpdesk/freescout/wiki/Connect-FreeScout-to-Microsoft-365-Exchange-via-OAuth
I've just tried the solution described above. Upgraded to the latest version of Freescout (1.8.50, running php 8.1.14)
I've just sendt a test email. Sadly it did not fix the issue for me - The email is still blank :(
I've just tried the solution described above. Upgraded to the latest version of Freescout (1.8.50, running php 8.1.14)
- Created a new Application in Azure with the extended permissions
- Verified that the security defaults are disabled in Azure
I've just sendt a test email. Sadly it did not fix the issue for me - The email is still blank :(
Try to contact Webklex to debug together with him: https://github.com/Webklex/php-imap/issues/275#issuecomment-1379906628
I've just sendt a test email. Sadly it did not fix the issue for me - The email is still blank :(
This solution https://github.com/freescout-helpdesk/freescout/issues/1972#issuecomment-1385554715 fixed the issue for others. Make sure you are using FreeScout v1.8.35 or higher.
I'm using Ubuntu 22.04.1 LTS in solution #1972 (comment) Idk if that makes a difference in docker or Ubuntu 20.04
@jopdorp @mbl72 Try to add all available permissions to the app in Azure and check.
At webklex they say that it works in their master branch. I tried upgrading to their master or to php-imap 5.0.0, but then there is a large chain of other libraries that would need to be updated, including laravel
There are two things here: 1) There was an issue in webklex/php-imap library which caused ab empty body issue. It has been fixed now. 2) Another reason of empty body - is Microsoft Azure glitch or incomplete configuration.
So all the tests without using Microsoft Azure will work fine now. We need to figure out what is causing empty body when Microsoft Azure is used.
- re was an issue in webklex/php-imap library which caused ab empty body issue. It has been fixed n
I think this wasn't fixed in the 4.1.1 version yet, but in 5.0.0, which freescout doesn't use yet
@jopdorp @mbl72 Try to add all available permissions to the app in Azure and check.
azure has hundres of permissions, I'm not sure I can just do this. Do you have a list of the permissions you're testing with? Then I can add those.
Empty body on webklex/php-imap
side was fixed in https://github.com/Webklex/php-imap/releases/tag/4.1.0
Try to contact Microsoft Azure's support - maybe they can give an advice on what in their system may cause an empty body when fetching emails via IMAP.
that is a different issue https://github.com/Webklex/php-imap/issues/275#
that is a different issue Webklex/php-imap#275
There is no empty body fixes after https://github.com/Webklex/php-imap/releases/tag/4.1.0. This issue https://github.com/Webklex/php-imap/issues/275 has been created before the empty body issue has been fixed in webklex/php-imap
4.1.0
For now we are working around it by using a different e-mail provider and a different domain
that is a different issue Webklex/php-imap#275
There is no empty body fixes after https://github.com/Webklex/php-imap/releases/tag/4.1.0. This issue Webklex/php-imap#275 has been created before the empty body issue has been fixed in
webklex/php-imap
4.1.0
Adding all available permissions is not an option, azure has hundreds of them, which I cannot just all add due to security reasons
Those who still have empty body issue - do you receive emails without body and without attachments or you have empty body and "undefined" attachment?
We have conversations with an empty body and with an "undefined" attachment. And the undefined attachment seems to contain the body of the email.
Yes, we also receive empty emails with an undefined attachment that appears to contain the body.
Those who still have empty body issue - do you receive emails without body and without attachments or you have empty body and "undefined" attachment?
For this kind of issue the fix has been applied in FreeScout v1.0.54. Let us know if empty body issue still persists after this release for MS365 accounts.
We have an empty body without attachment
Now running v1.0.54, we're receiving emails from senders that would have previously had the undefined attachment included, but now we're getting no attachment or body text.
Now running v1.0.54, we're receiving emails from senders that would have previously had the undefined attachment included, but now we're getting no attachment or body text.
Same issue here..
BUT, The update to 1.0.54 did have some effect.
Previously, If I sent emails from my private account (not a M$ account), the text was missing, with the "undefined" attachment added to the conversation. Now the body is displayed correctly. Another test with an attachment resulted in a conversation with the attachement, but without any body content :(
If I sent a mail from my company account (A M$ account) the body is empty, and no attachments are visible.
If I try to use the "Show original" function, the following is displayed. "The original message could not be loaded from mail server, below is the latest truncated copy stored in database."
The message IS still on the server.
(Both email were sent with the same Outlook email client)
Another test with an attachment resulted in a conversation with the attachement, but without any body content :(
If I sent a mail from my company account (A M$ account) the body is empty, and no attachments are visible.
Please send examples to support@freescout.net
Another test with an attachment resulted in a conversation with the attachement, but without any body content :( If I sent a mail from my company account (A M$ account) the body is empty, and no attachments are visible.
Please send examples to support@freescout.net
I've sent the 3 examples including screenshots from Freescout
I am experiencing the same problem. Is it helpful if I also send samples to support@freescout.net? Or do you already have enough information?
The problem is probably that the ticketing system does not correctly process the message encoding. Usually this is due to the fact that the letter contains a non-standard encoding that the system cannot correctly interpret. In addition, it is possible that the system cannot process all elements of the MIME structure of the email that display the content of the email.
In the case of a particular email, the reason may be that the content of the email is in a "multipart/related" section that contains multiple parts, including attachments. The ticketing system may not be able to process this correctly and will not display the contents of the email.
Some updates have been made in FreeScout v1.8.66 which may help to avoid empty body issue when using modern Microsoft OAuth IMAP authentication. All those who have this issue try to install FreeScout v1.8.66 and check.
Some updates have been made in FreeScout v1.8.66 which may help to avoid empty body issue when using modern Microsoft OAuth IMAP authentication. All those who have this issue try to install FreeScout v1.8.66 and check.
Sadly, for us the issue still remains open in 1.8.66
@mbl72 Can you send one email giving an empty body to support@freescout.net (but send directly, not as a ZIP archive).
@mbl72 Can you send one email giving an empty body to support@freescout.net (but send directly, not as a ZIP archive).
Just to be sure..
Send an email directly from the account to support@frescout.net ?? Or download the email from the Office mailbox and send the eml file to you ??
Send an email directly from the account to support@frescout.net (not as FWD or attachment).
Done :)
Our FreeScout instance successfully fetched the test email from support@freescout.net and fetched email has a body.
The support@freescout.net address is hosted on other than MS 365 email provider. It means the cause of your issue with an empty body is in Microsoft Office 365 configuration. Try to contact their support and ask what should be configured in MS 365 not to have the empty body in emails retrieved via IMAP with OAuth authentication. Send them this info too: https://github.com/freescout-helpdesk/freescout/issues/1972#issuecomment-1385554715
Our FreeScout instance successfully fetched the test email from support@freescout.net and fetched email has a body.
The support@freescout.net address is hosted on other than MS 365 email provider. It means the cause of your issue with an empty body is in Microsoft Office 365 configuration. Try to contact their support and ask what should be configured in MS 365 not to have the empty body in emails retrieved via IMAP with OAuth authentication. Send them this info too: #1972 (comment)
It would make sense, if ALL mails were blank. This, however, is not the case.
I did some more digging.. It seems to have something to do with mails that are internally relayed for the same tennant in Office365, which MIGHT have something to do with the mail headers.
We have several domains connected to the same tennant/account in Microsoft365, we also have 2 tennants. Doman A.com & B.com are on Tennant X. Domain C.com is on Tennant Y.
I tried this. When I send an email via my outlook client connected directly to Office 365 on the same tennant. (From z1@A.com to z2@A.com or from z1@B.com to z2@A.com - The mail body is blank.
When I send an email via my outlook client connected directly to Office 365 on the other tennant. (From z1@C.com to z2@A.com – Everything is fine.
And I'm fairly certain that the first thing the support-team from Microsoft asks for, is some kind of log.. Is there any way I can create a detailed log with Freescout? To see the communication between the mailserver and Freescout ??
Is there any way I can create a detailed log with Freescout? To see the communication between the mailserver and Freescout ??
Yes. Add APP_DEBUG=true
to the .env file and clear cache. After that run in the console:
php artisan freescout:fetch-emails
Is there any way I can create a detailed log with Freescout? To see the communication between the mailserver and Freescout ??
Yes. Add
APP_DEBUG=true
to the .env file and clear cache. After that run in the console:php artisan freescout:fetch-emails
I managed to enable the debugging. Tricky as we're using the TiredOfIt docker instance. The body IS returned from Office365.
I've sent the content from the fetch-emails to support@freescout.net
I did the following (after connecting to the console)
docker container exec -it freescout-app /bin/bash
cd /www/html nano config/app.php
Edit the 'debug' line
'debug' => true,
Save the file.
php artisan config:clear php artisan cache:clear php artisan freescout:fetch-emails
This returns the detailed information.
Edit app.config again to undo.
nano config/app.php
Edit the 'debug' line 'debug' => env('APP_DEBUG', false),
Save the file.
php artisan config:clear php artisan cache:clear php artisan freescout:fetch-emails
@mbl72 We've got an excerpt of php artisan freescout:fetch-emails
output from you by email. It would be good to have the full output as a file: php artisan freescout:fetch-emails > /path/to/file.txt
@mbl72 We've got an excerpt of
php artisan freescout:fetch-emails
output from you by email. It would be good to have the full output as a file:php artisan freescout:fetch-emails > /path/to/file.txt
Done.
@mbl72 Can you please also prepare and send similar log for the case when the email is being successfully fetched into your FreeScout and have a body (to check the difference between two logs).
We've found the reason of the problem.
Those who have an empty body issue - to fix it right away download this file https://github.com/freescout-helpdesk/freescout/blob/master/overrides/webklex/php-imap/src/Message.php into your FreeScout into "overrides/webklex/php-imap/src/Message.php" and empty body issue will go away. The fix will be included in the next FreeScout release.
Updated to the latest version 1.8.69 by docker. It is glad to see that most of the emails display the content successfully.
But there is still some problem:
Yes, I can confirm that too. For us and other customers, it affects 50% to 80% of all emails. The problem is that you have to be able to view the originals when Freescout parses the emails, because Freescout generally does not display replies from the sender's previous emails (support agent). Freescout only shows what was written above the last reply from the support agent. However, customers often have the habit of marking previous emails with red comments, for example, in order to make better use of the context. Freescout should therefore have a function that allows such content to be displayed in the ticket history.
We are having an issue where external replies to conversation or new conversations that are forwarded show up as empty, when we try to show original we also get an empty page with
as the body view. The headers show up as well.
Those messages have content in them because when we go to outlook we are able to see the message.
The log does not have any parsing error or fetching errors but we are seeing this issue in 2% of the emails we receive every day. I would like to debug the issue so any pointer would help, also a workaround that doesn't involve logging to outlook every time it happens would be helpful.