Question
Zurich Versicherungs-Gesellschaft AG
CH
Last activity: 18 Mar 2025 8:02 EDT
Sending email with screenshots
Greetings,
we are currently facing an issue with outbound emails which contain screenshots in the email body (no attachment).
Scenario
A user enters the text of his email into a richtext editor and also copies screenshots of various sizes into it. He then proceeds to send out the email.
Expectation
The email arrives and contains all screenshots inside the email body.
Result
I have seen two different results:
- The email arrives with the smaller screenshots inside the email body, but the large screenshots are missing. The correspondence attached to the case contains every screenshot and looks fine.
- The "Fix Correspondence" flow is triggered and the following error message is displayed: "Caught unhandled exception : The request size exceeds the maximum limit.".
The correspondence itself looks fine and contains all screenshots/pictures inside the body.
Investigation results
Greetings,
we are currently facing an issue with outbound emails which contain screenshots in the email body (no attachment).
Scenario
A user enters the text of his email into a richtext editor and also copies screenshots of various sizes into it. He then proceeds to send out the email.
Expectation
The email arrives and contains all screenshots inside the email body.
Result
I have seen two different results:
- The email arrives with the smaller screenshots inside the email body, but the large screenshots are missing. The correspondence attached to the case contains every screenshot and looks fine.
- The "Fix Correspondence" flow is triggered and the following error message is displayed: "Caught unhandled exception : The request size exceeds the maximum limit.".
The correspondence itself looks fine and contains all screenshots/pictures inside the body.
Investigation results
I have found an article mentioning some DSS (How to change the maximum file size for attachments | Support Center). However those DSS do not exist on our system and the default values are way higher than the size of the actual string representation of the whole correspondence. Also the screenshots/pictures are not attachments, but a part of the email body. As far I could see in other articles the mailbox was blamed, but I have sent the same screenshots, using the same email account, from Outlook (I tried once with including the screenshots in the mail and I also tried with the whole string representation of the correspondence (HTML+base64 of the pictures)) and it worked fine. So I don't think it has to do with a size limitation on the email account.
Configuration
We are on the PegaCloud (Pega Infinity 24.2). We are connecting to the email account using MS Graph both for sending and receiving.
Do you have an idea how this issue could be solved? Is it a mailbox or a Pega problem?
Thanks and regards,
Bernd
Update:
MS Graph seems to have a limitation of 3MB for the email body. When pictures are copy pasted into a RichTextEditor these pictures get inserted into the body as a base64 string. This can lead to the email body exceeding this 3MB limit, MS Graph rejecting the email and Pega handling this error correctly, by starting a "Fix Correspondence" flow.
Unfortunatelly there is another small issue:
When the inserted picture causes the body to be below 3MB, but above 120KB, the email gets sent, but it arrives without the picture. Currently Pega claims this is another MS Graph bug, however I would expect the email sending to fail completely and not just partially if this really was MS Graph related.
I have asked Pega to either raise an INC with Microsoft or try to implement a fix/error handling/savety inside of Pega. Hopefully they will do so (FDBK-125106).
From customer side, we have implemented a savety check by counting the chars of the email body to be below this 120k limit. However this counting is inaccurate as used memory per char varies on the charset used and the character itself, so this is not a nice fix.