Email function not working for users after upgrade to CAPM 3.5

Document ID : KB000096358
Last Modified Date : 16/05/2018
Show Technical Document Details
Issue:
Hi Team, Since the recent 3.5 March upgrade, users are not receiving emails from CAPM. We are using SAML2 and getting the following error in the log. 

ERROR | EmailJobTaskThreadPool-Thread-63 | 2018-04-26 19:46:22,372 | com.ca.im.portal.dm.scheduling.email.EmailJobTask 
| Error sending email: Server redirected too many times (20) 
java.net.ProtocolException: Server redirected too many times (20) 
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1884) 
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) 
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) 
at com.ca.im.portal.dm.scheduling.email.EmailJobTask.run(EmailJobTask.java:144) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
at java.lang.Thread.run(Thread.java:748) 
Resolution:
This is can occur and is caused by the attempted reauthorization of the user through SAML.
There is a way to not have it re-auth the user against SAML2 and that's skipRedirectAuthenticationUrl. 
In PC/webapps/pc/META-INF/spring/bean.xml. Do the following to correct the problem.

In PC/webapps/pc/META-INF/spring/bean.xml

Add the line below and restart the PC service.. 
<value>[^\?]+/pdf/page\?.*</value> 

It should look like this after the edit. 
<bean id="skipRedirectAuthenticationUri" class="com.ca.im.portal.util.AuthenticationUrl"> 
<property name="urlPatterns"> 
<set> 
<value>[^\?]+/pagedata\?.*</value> 
<value>[^\?]+/fileupload\?.*</value> 
<value>[^\?]+/filedownload\?.*</value> 
<value>[^\?]+/pdf/page\?.*</value> 
</set> 
</property> 
</bean>