Problem in extracting emails via EWS from 11134

Problem in extracting emails via EWS from 11134

Emails getting fetched via EWS are getting failed to process and stops the Mail Fetching when that mail's object doesn't have InternetMessageHeaders.

Note: This issue will not occur for all emails extracted via EWS except for the emails which don't have the expected header in them. (which will be a rare scenario)
The issue started occurring from 11134 due to the fix of SD-84472, in which the content-type mail header is extracted for fixing it.

Issue ID: SD-92222

Exception Error Trace:

[14:49:48:419]|[12-29-2020]|[com.manageengine.servicedesk.mail.core.ProcessEWSMessage]|[SEVERE]|[147]: Exception in getting mailcontent|
[14:49:48:419]|[12-29-2020]|[com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask]|[SEVERE]|[147]: Exception : Exception while extracting attachments and inline images|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: com.manageengine.servicedesk.mailutils.MailException: Exception while extracting attachments and inline images|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.manageengine.servicedesk.mail.core.ProcessEWSMessage.loadProperties(ProcessEWSMessage.java:356)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.manageengine.servicedesk.mail.core.ProcessMessageHandler.loadPropertiesIntoBean(ProcessMessageHandler.java:73)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.manageengine.servicedesk.mail.core.ProcessMessageHandler.loadProperties(ProcessMessageHandler.java:45)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.servicedesk.mailutils.MailProcessor.processEMail(MailProcessor.java:54)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask.emailThreadOfEWS(MailFetchingTask.java:472)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.servicedesk.helpdesk.mail.task.MailFetchingTask.executeTask(MailFetchingTask.java:100)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.taskengine.internal.SchedulerBean.executeTask(SchedulerBean.java:634)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.lang.reflect.Method.invoke(Method.java:498)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.mfw.bean.BeanProxy.invoke(BeanProxy.java:115)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.sun.proxy.$Proxy5.executeTask(Unknown Source)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.taskengine.internal.ScheduleExecutor.executeNextTask(ScheduleExecutor.java:191)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.adventnet.taskengine.internal.ScheduleExecutor.run(ScheduleExecutor.java:86)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.FutureTask.run(FutureTask.java:266)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at java.lang.Thread.run(Thread.java:748)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: Caused by: java.lang.NullPointerException|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.manageengine.servicedesk.mail.core.ProcessEWSMessage.extractAttachmentsAndInlineImages(ProcessEWSMessage.java:368)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: at com.manageengine.servicedesk.mail.core.ProcessEWSMessage.loadProperties(ProcessEWSMessage.java:352)|
[14:49:48:419]|[12-29-2020]|[SYSERR]|[INFO]|[147]: ... 20 more|


Files Modified :
<SDP>\helpdesk\src\library\com\manageengine\servicedesk\mail\core\ProcessEWSMessage.java

Jar Compatibility :
    11134 , 11135 - SDP Build Version

          • Related Articles

          • List of mail fetching issues and solutions

            Scenario 1 : Mail fetching issue due to Invalid or No PKIX certificate .   Log traces for Mail Fetching  issues Exception when connecting to store.|javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: ...
          • Failure during Zia Reopen prediction process stops the mail fetching schedule

            When the requester replies to closed/resolved requests with empty content or if there is no proper content except the content of the parent mail, then no content will be available for zia reopen prediction process and an exception will be ...
          • Debug jar for Formatting issue in request while processing via email

            Debug jar for finding the actual root cause for the formatting issue in requests created via Mail. Added debug log prints to troubleshoot the issue Reference Ticket:  ...
          • Applying mail server's certificate in ServiceDesk Plus

            To establish a secure connection between ServiceDesk Plus and email servers configured with a self-signed certificate, follow these steps: 1. Download the attached file. 2. Extract the files to the ServiceDesk Plus directory. 3. The files will now be ...
          • Apply certificate for EWS mail configuration in SDP.

                  EWS protocol support is introduced in 10006 version of SDP ( Limited to windows servers ). User can configure EWS for both incoming and outgoing settings in SDP.   To apply the certificate for EWS protocol in SDP, please follow the below steps ...