How to trace email session in Wildfly 8.2.x environment for troubleshooting email delivery problem

Document ID : KB000047767
Last Modified Date : 14/02/2018
Show Technical Document Details


In Identity Manager r12.6 sp8 or SecureCloud 1.56 environment, the IM Server is running on Wildfly 8.2.x. Sometime our end users complain that they don't receive email Activation Code (a.k.a. One Time Password). Hence we need a way to trace the SMTP session before engaging the mail service provider to check if there is any mail delivery problem.




  • Identity Manager r12.6 sp8
  • SecureCloud 1.5.6


  1. Open Wildfly configuration file, (i.e. wildfly-8.2.1\standalone\configuration\standalone-full.xml).
  2. Find the section of mail service subsystem , add debug="true" attribute on each of the mail-session items.

    <subsystem xmlns="urn:jboss:domain:mail:2.0">

    <mail-session debug="true" jndi-name="java:jboss/mail/Default" name="default">
    <smtp-server outbound-socket-binding-ref="mail-smtp"/>

    <mail-session debug="true" jndi-name="java:/Mail" name="IMMail">
    <smtp-server outbound-socket-binding-ref="mail-smtp"/>

  3. Save the change
  4. Follow TEC1666703 to deploy the logging.jsp
  5. Restart the Identity Manager server
  6. Access the logging.jsp, i.e. http://imserver:8080/iam/im/logging.jsp
  7. On the Set Logger page, add a Category STDOUT and click on Set. Please keep the logging level as ALL
  8. Try to trigger the IM server to send out an email.
  9. Check the Identity Manager server.log, you will see all the full SMTP session being logged.
  10. The logs can be sent to mail service provider for troubleshooting purpose.

Additional Information:

  • TEC1666703 - How to configure logging.jsp in JBoss EAP 6.x / Wildfly 8.2.x