Debug: Workaround for mail sending failure intermittently in Scheduled Reports

Debug: Workaround for mail sending failure intermittently in Scheduled Reports

Root cause: For reports with inline images, the images will be generated as embedded image (data:image/xx). While sending mails, we will process this image using PreencodedMimeBodyPart. This internally triggers, "ImageDataContentHandler.writeTo()" which accepts only java.awt.image object instead of String. Thus, it throws error eventually

Workaround: In addition to "PreencodedMimeBodyPart", we are setting the data source and data handler so that, jakarta mail api doesn't lookup for a data handler.

Steps to apply:

1. Download the attached .fjar file corresponding to your build version.
2. Click here for steps to apply the .fjar file.
3. Restart the application service.
4. If the issue occurs again, enable the email debug in the application, recreate the issue after enabling the email debug then immediately zip the logs (<server_home>\logs folder. For eg: C:\Program Files\ManageEngine\ServiceDesk\logs folder) and share it with us for analysis. If the size of the log file is huge, you can send it to us using our FTP link https://bonitas2.zohocorp.com/. Select the product as "ServiceDesk Plus" and provide the proper ticket number.


Compatible jar versions - 15150 (SDP)

                  New to ADSelfService Plus?

                    • Related Articles

                    • Scheduled Reports

                      This report is used to get the complete list of all the scheduled reports with the owner name configured in the application.  SELECT CustomReport_Details.REPORT_NAME "Report Name", AaaUser.FIRST_NAME "Owner" FROM ReportScheduleTask LEFT JOIN ...
                    • Scheduled Backup Failure

                      Sometimes the scheduled backup fails due to the below error in the logs, Error Message org.postgresql.util.PSQLException: An I/O error occured while sending to the backend. at ...
                    • Debug / Workaround : Disabling license check in the Mail fetching and Sending layer

                      Issue: For unexpected reasons, the license status of the portals where changed to "License expired". However, this is not reflected in all the MDH caches. So, CUD operations were allowed in the portal. However, during mail flow, we check the license ...
                    • Mail sending failed_Unable to relay

                      Error trace in logs: javax.mail.SendFailedException: Invalid Addresses;nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay Possible Cause: The SMTP server does not allow relaying unless you are sending email ...
                    • Fix: Error while sending mail using EWS

                      Issue trace: [11:58:49:091]|[11-29-2022]|[SYSERR]|[INFO]|[122]: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The operation can't be performed because the item is out of date. Reload the item and try ...