Attachment could not be extracted

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

If Auditing is not enabled, then has resulted in data loss as there will not be a copy of the email stored within Auditing and as a result cannot be modified and re-processed using JEMH > Test Cases.

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:

  1. If enabled, go to JEMH > Auditing > Incoming Mail and find the problem email.

  2. Press (…) > Create test case

  3. Go to JEMH > Test Cases

  4. Press Edit on the newly created Test Case

  5. Find the duplicate headers (e.g. “filename”) for that attachment and then remove the first occurring header. Below is an example before and after:

    1. 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
    2. 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