Unable to send reply’s in a specific format from the application when EWS is configured

Unable to send reply’s in a specific format from the application when EWS is configured

 When trying to send reply mail, if a user mail address is entered in the format "Name<email-address>", then an exception in EWS since, could not resolve this toaddress.

Log Trace : 

  1. [22:10:27:393]|[09-21-2022]|[SYSERR]|[INFO]|[157]: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: At least one recipient is not valid., Recipient 'name <xyz@xyz.com>' is not resolved. All recipients must be resolved before a message can be submitted.
  2. [22:10:27:393]|[09-21-2022]|[SYSERR]|[INFO]|[157]: at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)|
  3. [22:10:27:393]|[09-21-2022]|[SYSERR]|[INFO]|[157]: at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)|


Cause :

      Issue occurs in the EWS Mail & not in JAVAMAIL(SMTP)  which are explained below.
In Javamail, the toaddresses & ccaddresses are parsed before sending layer and In EWS, the addresses are not parsed before sending layer.
  1.  emailMessage.getToRecipients().add(address);

Fix :

In EWS, Address are parsed before sending layer.
  1. emailMessage.getToRecipients().add(new InternetAddress(address).getAddress());
Multiple Mail Addresses should be separated by comma (,) in those fields.

Build Compatiblity : 13008


Ref Ticket : 8104298 

                  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 ...
                      • 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. Note: If the mail server is O365 , then you need not perform these steps as the ...
                      • How to send periodic notifications to requester(s) about their pending requests and accordingly update their status.

                        This post describes the use of a python script to notify requester(s) about their requests through email and move those to a specific status. Use Case: Let us assume a scenario where the technicians reply to a request and put it in a custom status ...
                      • 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 ...
                      • Port Occupied / Application Layer Starting

                        If the port is already occupied (as in the screenshot), prompt as in below screenshot will appear.  Find application that uses the port by following the steps below, Execute, netstat -oan (This command will display list of processes and the ports ...