In the Identity Manager environment, sometimes 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.
Resolution
Open Wildfly configuration file, (i.e. wildfly-8.2.1\standalone\configuration\standalone-full.xml).
Find the section of mail service subsystem , add debug="true" attribute on each of the mail-session items.