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

                  New to ADSelfService Plus?

                    • Related Articles

                    • 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 ...
                    • EWS Mail fetching issue - Proxy not enabled for ews. isIncoming: true

                      Issue: EWS Mail fetching issue using different tenants Error trace 1: [23:30:20:701]|[01-23-2023]|[com.adventnet.servicedesk.common.MailUtilities]|[INFO]|[73]: Proxy not enabled for ews. isIncoming: true| ...
                    • Fix jar for EWS connectivity issue

                      Issue: In EWS for incoming, we are facing intermittent connectivity issues like 'unexpected end of ZLIB input stream', '(503) service unavailable', 'this connection to store is dead' etc. Resolution: Apply the attached fjar (Download the build ...
                    • 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: ...
                    • 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 ...