Handling Non Conformant emails
This page is for technical reference purposes, some knowledge of Java is needed.
Email Processing Failures
JIRA (and so, JEMH) uses the JavaMail library for most of the heavy lifting of email processing. Sometimes, emails that arrive are not quite compliant to the standard that Javamail supports, and as a result will fail to be processed by JEMH with a variety of possible error messages. Fixing these messages is difficult but possible, as yet, no such features are yet in JEMH, this means that if mail is delivered that has been generated by a buggy mail-server, there are some changes that can be made to fix the problem, however, doing so means exporting the message (perhaps from JEMH Auditing into a JEMH Test Case), or externally. If exporting to file, Javamail itself has some tools that can help locate problems:
Javamail
The current Javamail API used in JIRA 5.2.5 is Javamail 1.4.5.
FAQ: http://www.oracle.com/technetwork/java/javamail/faq/index.html
Main Site: http://www.oracle.com/technetwork/java/javamail/javamail-138606.html
Mercurial Sourcecode: https://hg.kenai.com/hg/javamail~mercurial
The Javamail source-code has a variety of utility type classes including 'msgshow' (great naming convention!), these can be built at the command line with just a JDK:
Copy the Javamail jar into the current directory
Copy msgshow.java into the current directory
javac -cp mail-1.4.5.jar msgshow.java
java -cp mail-1.4.5.jar:. msgshow -m < message
The message object can be exported via the JEMH Auditing or TestCase screens.