Mail Fetching Stopped Due to Inline Image Handling

Mail Fetching Stopped Due to Inline Image Handling

Issue Cause :

      While fetching a mail, in certain mail servers, cid of inline image is not parsed correctly. Once inline stream is converted to image, cid in src attr will be replaced with image url. cid for uploaded inline image in mail content is not same as in CidVsFileName map which results  in issue forming  CidVsFileName map in mail layer.
The "Content-ID" header of the mail isn't sent by the mail server for such mails. Due to this, API error occurs while adding request / conversation with inline images.
     
This issue will be released in build 14610 ( SD-114787 for your reference ).

Log Trace :

Notification is being notified. Please check it ...|
[13:29:50:029]|[12-27-2022]|[com.manageengine.sdpod.v3api.message.EntityMessages]|[SEVERE]|[721]: Unknown Error in v3 api| 
java.lang.NumberFormatException: For input string: "1916Image16721522515420"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.valueOf(Long.java:803)
at com.manageengine.servicedesk.v3api.utils.InlineImageUtil.getMediaIdFromMediaUrl(InlineImageUtil.java:628)
at com.manageengine.servicedesk.v3api.utils.InlineImageUtil.handleHTMLContent(InlineImageUtil.java:359)
at com.manageengine.sdpod.v3api.handlerimpl.DefaultEntityHandler.processInlineMediaFiles(DefaultEntityHandler.java:1938)

Resolution:

      The fix for the issue has been attached with this article. Check the "Jar Compatibility" section to download the appropriate fix jar file (.fjar file) to resolve this. Check this link on how to apply the fjar file ?

How we fixed:

      If the "Content-ID" header for the inline image part isn't returned by the mail server, that particular inlineimage is added as attachment to the request / conversation. In description, empty box will be present in the place of image when the inline image is added as attachment.

      To acknowledge that the applied fjar is fixing the issue, a notification will be sent to the "Technicians" configured under "Send e-mail when an Application Error Occurs" notification rule (The rule needs to be enabled) for every mail that face this issue. 



      Find the below screenshot for the sample notification. The notification contains basic information of the mail along with the entity details (The mail gets created as new request / conversation to request / change / release ).



Issue isn't resolved (?)
      
      If issue isn't resolved after applying the fjar, reach our support (support@servicedeskplus.com) with the above mail (as .eml attachment) along with the logs folder. If the size of logs folder exceeds attachment size, create a ticket with the support and follow the below steps.

2. Select the product as "ServiceDesk Plus" and ticket number as the one created.
3. Upload the logs zip.

JAR Compatibility

Build No
File Name

14101-14102

14101_14102_inline_image_fix.fjar
14103

14103_inline_image_fix.fjar

14505
 
14505_inline_image_fix.fjar


14600

1_14600_inline_image_fix.fjar


                    New to ADSelfService Plus?

                      • Related Articles

                      • Mail Fetching: Inline Images Dropping Due to Invalid Extension

                        Issue: The inline image's file name from the email doesn't contain the extension. Example: filename = sys_attachment.dosys_id=5bb0751c8303b5dc96a238226daad371 As a result, the inline image gets stripped during the mail fetching process. The sender of ...
                      • Mail fetching - deleted flag issue

                        This message will be thrown, when you have provided a shared mailbox. The concept here is, SDP MSP reads the mail from the configured mailbox and adds it as a request. During the time, if some other application fetches the mail from the same mailbox ...
                      • Mail Fetching - Error while processing attachment and inline image.

                        Issue During the process of fetching emails, attachments are dropped as a result of the presence of directory traversal characters. Furthermore, an issue arises when processing inline images, this particular error related to inline images results in ...
                      • Mail Fetching : Inline Image URL Replace error.

                        Issue: Mail fetching is stopping due to inline image Handling. The problem with replacing inline image URLs is the underlying cause of the issue. The issue will occur during addition of conversation not in new request creation. ErrorTrace: ...
                      • Exception while Processing Inline Image with incorrect file name extension

                        Reference : #7938623, #8561970 Cause : Inline Images could not be processed with incorrect file name, for example "4d54308871ec465c8233d0f470db0308.do?sys_id=4fdfcb17475c1d50c594c133846d436a" . While constructing the filename in our end, the values ...