Summary
When there is an issue with extracting and adding an attachment to an issue, JEMH will add the exception within the Report and will add a message to the relevant Description/Comment to make this issue easier to identify.
One reason this can be caused is due to the attachment containing an additional “filename” header within the email. For example:
Content-Type: image/jpeg; name="This is a test attachment name.jpg" Content-Description: This is a test attachment name Calendar invite.jpg Content-Disposition: attachment; filename="This is a test attachment filename="This is a test attachment name.jpg"; size=1757; creation-date="Wed, 24 Apr 2024 18:21:17 GMT"; modification-date="Wed, 26 Apr 2024 15:23:56 GMT" Content-Transfer-Encoding: base64
Solution to add attachment
Currently there is no feature within JEMH that will remove this additional header at processing time. Due to this, the only way to allow the attachment to be added is to go to JEMH Auditing and create a test case from the problem email and then manually remove this additional header.
Steps to add the broken attachment:
If enabled, go to JEMH > Auditing > Incoming Mail and find the problem email.
Press (…) > Create test case
Go to JEMH > Test Cases
Press Edit on the newly created Test Case
Find the duplicate headers (e.g. “filename”) for that attachment and then remove the first occurring header. Below is an example before and after:
Before:
Content-Type: image/jpeg; name="This is a test attachment name.jpg" Content-Description: This is a test attachment name Calendar invite.jpg Content-Disposition: attachment; filename="This is a test attachment filename="This is a test attachment name.jpg"; size=1757; creation-date="Wed, 24 Apr 2024 18:21:17 GMT"; modification-date="Wed, 26 Apr 2024 15:23:56 GMT" Content-Transfer-Encoding: base64
After:
ontent-Type: image/jpeg; name="This is a test attachment name.jpg" Content-Description: This is a test attachment name Calendar invite.jpg Content-Disposition: attachment; filename="This is a test attachment name.jpg"; size=1757; creation-date="Wed, 24 Apr 2024 18:21:17 GMT"; modification-date="Wed, 26 Apr 2024 15:23:56 GMT" Content-Transfer-Encoding: base64