Configuring a different mail Socket Factory

By default HCL Commerce mail uses for its Socket Factory. If you use a third-party mail service like Amazon Web Services or Microsoft Office 365, you might need to change the Socket Factory to


  1. Navigate to the WAS_installdir/lib/ directory.
  2. Open the properties file in a text editor. If it does not exist, create it.
  3. Update the configuration to suit your requirements.

    For a list of possible JavaMail configuration parameters, see the package description of com.sun.mail.smtp: Package com.sun.mail.smtp.

    For example, to change the Socket Factory to, include the following line in your properties:
  4. Save and close the file.
  5. Restart the HCL Commerce Java virtual machine for the changes to take effect.
    Note: The following exception can be observed in the logs if the incorrect socketFactory.class set:
    Caused by: javax.mail.MessagingException: Exception reading response;
    nested exception is: Unrecognized SSL message, plaintext connection?
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(
    at com.sun.mail.smtp.SMTPTransport.openServer(
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(
    at javax.mail.Service.connect(
    at javax.mail.Service.connect(
    at javax.mail.Service.connect(
    at com.sun.mail.smtp.SMTPTransport.connect(


The Socket Factory and its settings are changed to the ones specified in the properties file.