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 ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • 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: ...
                      • Problem while fetching a mail since the mail's boundary value is not enclosed with the double quotes.

                        Issue: The mail will not be fetched/processed since the boundary value of the email is not enclosed within double quotes. javax.mail.internet.ParseException will be thrown. Emails causing this type of error will not be moved to error folder. This ...
                      • Troubleshooting Oauth configuration for mail server settings

                        Oauth in ServiceDesk Plus / AssetExplorer for Mail SDP supports Oauth configuration for Office365 and GSuite mailboxes since 11106 build. Office365 mailboxes can be configured with Oauth authentication using EWS (since 11106) and IMAP / SMTP (since ...
                      • 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 ...