Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

SendEmailMessage function does not support TLS1.2 handshake

SA-68677

Summary



When new cryptographic protocols (TLS 1.2) are enforced, email notifications do not work in the application. The application works with the old protocols (TLS 1.0 and TLS 1.1).


Error Messages



[WebContainer : 12] [TABTHREAD1] [PegaRULES:07.10] (pega_integrationengine_default) ERROR HOSTNAME|IPADDRESS your_user@pega.com - Exception caught while testing connection to SMTPHOSTNAME as user PegaMailbox@DOMAIN javax.mail.MessagingException: Could not connect to SMTP host: SMTPHOSTNAME, port: 25;
  nested exception is:
      javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2055)
      at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
      at javax.mail.Service.connect(Service.java:364)
      at javax.mail.Service.connect(Service.java:245)
      at com.pegarules.generated.SendEmailMessage_071017_QqZSmK6END_WjYi_YBeMHA.SendEmailMessage07_10_17(SendEmailMessage_071017_QqZSmK6END_WjYi_YBeMHA.java:309)
      at com.pegarules.generated.SendEmailMessage_071017_QqZSmK6END_WjYi_YBeMHA.invoke(SendEmailMessage_071017_QqZSmK6END_WjYi_YBeMHA.java:87)
      at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
      at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
      at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8954)
      at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
      at com.pegarules.generated.pega_integrationengine_default.SendEmailMessage(pega_integrationengine_default.java:167)
      at com.pegarules.generated.activity.ra_action_smtpconnectivity_1b1b973395b389d8461782791fd40dce.step8_circum0(ra_action_smtpconnectivity_1b1b973395b389d8461782791fd40dce.java:862)
      at com.pegarules.generated.activity.ra_action_smtpconnectivity_1b1b973395b389d8461782791fd40dce.perform(ra_action_smtpconnectivity_1b1b973395b389d8461782791fd40dce.java:222)
      at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
      at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
      at com.pegarules.generated.activity.ra_action_pysmtpconnectivity_7850fbed76b5c25248849851ebc5f379.step2_circum0(ra_action_pysmtpconnectivity_7850fbed76b5c25248849851ebc5f379.java:282)
** ** **
Caused by: 
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
      at com.ibm.jsse2.c.c(c.java:65)
      at com.ibm.jsse2.c.a(c.java:70)
      at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:530)
      at com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:264)
      at com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:741)
      at com.ibm.jsse2.SSLSocketImpl.startHandshake(SSLSocketImpl.java:100)
      at com.ibm.ws.ssl.config.WSSocket.startHandshake(WSSocket.java:414)
      at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:543)
      at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:348)
      at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:215)
      at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)



Steps to Reproduce

  1. Set the following generic JVM argument to enable SSL DEBUG trace and explicitly enable TLS 1.2 client protocol only in IBM WebSphere Application Server (WAS).

    -Djavax.net.debug=all:handshake:verbose -Dcom.ibm.jsse2.overrideDefaultTLS=true -Dhttps.protocols="TLSv1.2" -Dmail.debug=true
     
  2. Configure an EmailAccount with any public secured SMTP server (for example, smtp.mail.yahoo.com).
  3. Invoke the SendEmailNotification activity. ClientHello for the SSLHandshake is initiated using TLS1 irrespective of the explicit client protocol JVM arguments.


Root Cause



A defect in Pegasystems’ code or rules.
EmailAccount rule form does not facilitate providing JavaMail SMTP custom properties such as mail.smtp.ssl.protocols.



Resolution



Apply HFix-48630.


 

Published December 4, 2018 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us