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 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 ...
                    • EWS support for TLS version above 1.0- Unable to save mail server setting when using microsoft exchange 2016

                       By default, EWS java api only supports TLSv1.0. Though SDP application supports TLSv1.1 and TLSv1.2 for mail fetching by default ( from 9405 ), EWS java api doesn't use the TLS versions specified in the System Properties. Thus, we are providing ...
                    • 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 ...
                    • "oops, outgoing mail server setting is not configured yet" error on EWS configuration

                      The error usually occurs when the user triggers actions that require to send an email but outgoing email is not configured, but there are cases where the error appears on EWS configuration even after the outgoing emails are working fine.  The below ...