E-mail Related Problems? Let the Logging Do the Talking
PeteHalbeisen 060001VQWA Visits (10005)
Providing logging up front is MustGather for troubleshooting in general and this entry provides the MustGather for troubleshooting email communications in particular. This includes whether the problem is server communication, outgoing, incoming, formatted, non-formatted, or template related.
Websphere is assumed otherwise consult your application server's documentation.
1) Be generous with application server log rotation:
In the Websphere administrative console this can be adjusted under Logging and Tracing > Server Name > JVM Logs
2) Add and enable JavaMail mail.debug in System Properties:
mail.debug = true
JavaMail debug has characteristic appearance. It shows in detail the application server's JavaMail communication sessions with the email server including raw email in transfer. It includes strings such as DEBUG <protocol? (e.g. DEBUG SMTP).
This is not an optional step; including this is non-negotiable. This output is not only relevant to email server connectivity problems.
Shutdown your application server and delete or back up the existing system logs. Upon application server restart, a fresh set of logs will be initiated. It's these SystemOut and SystemErr logs that you will be sending to support.
4) Reproduce the problematic scenario:
Perform a test case that causes the problematic behavior to occur.
Before sending the logs, check them to make sure they contain the information requested.
The logs you will send will include:
In conclusion, including all possible information upfront will reduce the number of back and forth "trips" necessary to find the root cause and solution of email problems.