Attaching email content to created issue

Summary

JEMHC can be configured to attach the email to issues when they are either created or commented on. This can be configured to either attach the full email or just specific body parts (HTML or Text).

Note: Attaching email to issue will consume (at least) double data when processing emails, due to uploading the entire email content size as an attachment.

Attach the full email

Below are the steps that needed to add the full email as an attachment on the issue.

  1. Ensure that Upload Attachments is set to all.

  2. Set Attach Email. Value set here will depend when you would like the email to be attached. Current Options are:

    1. Off - Does not attach any emails to the issue.

    2. On Create - Only attaches the Issue Creation email

    3. On Comment - Only attaches emails that have commented on the issue. Not including the creation email.

    4. On Create/Comment - Attaches all emails that have either created the issue or has commented on the issue.

  3. Set the Disable Zipping Original Content. By default the email will be compressed within a Zip file. If you do not want this then you will need to set this to Yes.

  4. Set Attached Email File Name Format. Defines the name format for the attached email content. This uses patterns to extract and set the relevant values within the filename. The default pattern is “%O-%Y-%T-%P.%E” and this results in the filename looking like the following “create-2011_6_19-0642-Andy_Brook.eml”. The available patterns are:

    1. %O - Operation used (Create or Comment)

    2. %Y - Sent date as YYYY_MM_DD

    3. %T - Sent time as HHMM

    4. %P - Personal name of the sender address.

    5. %E - File extensions as .zip, .html, .text or .eml.

Below is an example screenshot of the configuration. This configuration will add the full email when the issue is created and commented on.

Attach only the Text or HTML Body part.

Below are the steps that needed to add either the HTML or Text body part as an attachment on the issue.

  1. Ensure that Upload Attachments is set to all.

  2. Set either Attach HTML body or Attach Text Body. This would be dependant on which body type you would like to attach. The current options are:

    1. Off - Does not attach any emails to the issue.

    2. On Create - Only attaches the Issue Creation email

    3. On Comment - Only attaches emails that have commented on the issue. Not including the creation email.

    4. On Create/Comment - Attaches all emails that have either created the issue or has commented on the issue.

  3. Set the Disable Zipping Original Content. By default the email will be compressed within a Zip file. If you do not want this then you will need to set this to Yes.

  4. Set Attached Email File Name Format. Defines the name format for the attached email content. This uses patterns to extract and set the relevant values within the filename. The default pattern is “%O-%Y-%T-%P.%E” and this results in the filename looking like the following “create-2011_6_19-0642-Andy_Brook.eml”. The available patterns are:

    1. %O - Operation used (Create or Comment)

    2. %Y - Sent date as YYYY_MM_DD

    3. %T - Sent time as HHMM

    4. %P - Personal name of the sender address.

    5. %E - File extensions as .zip, .html, .text or .eml.

Below is an example screenshot of the configuration. This configuration will add both the HTML and Text part of the email to the issue when the issue is created and commented on.

Excluding Attached Email Content from outbound notifications

When you have attach email content enabled it will result in these attachment being included within the outbound notification (You may not want this). This can be stopped by having a Global Expression that matches the filename of attachments that you do not want to attach.

If you are using the Default Filename format (%O-%Y-%T-%P.%E) then you will be able to use:

  • comment-20[0-9]{2}_[0-9]{2}_[0-9]*-[0-9]{4}-.*\.zip as the regex to exclude the Email Content attachments that have been created when a Comment was added to the issue.

  • create-20[0-9]{2}_[0-9]{2}_[0-9]*-[0-9]{4}-.*\.zip can be used to exclude the Email Content attachments that have been added during Issue Creation.

Configuring Exclusion

In this example we want to exclude comment-2011_06_19-0542-ryan@thepluginpeople.com-5.zip. This means we will use comment-20[0-9]{2}_[0-9]{2}_[0-9]*-[0-9]{4}-.*\.zip to match the attachment.

  1. Go to Exclusions > Exclude attachment by content type, size and file name and press create.

     

  2. Enter the Attachment Content Type. “application/zip” in this example.

  3. Specify a File name Regex that will match the attachment name. In this case the Regex will be comment-20[0-9]{2}_[0-9]{2}_[0-9]*-[0-9]{4}-.*\.zip

  4. Specify Outgoing Emails within Direction. So that this only applies on outgoing emails.

  5. Specify the Reason why you would like these attachments to be excluded.

Testing Exclusion

Once configured, you will then be able to test this configuration by running a Test Case that creates a comment on a issue and then viewing the Audit Event Report to see that the attachment has been excluded from the notification.

  1. Go to JEMHC > Test Cases

  2. Press Run for a Test Case that will comment on a Issue. (You may need to create a Test Case)

  3. You will then see a Report that states a comment has been added and that an attachment was added to the issue.

  4. Now go to JEMHC > Auditing > Events. You should see a new event being queued.

  5. Once processed you will be able to access the Processing Report for this event.

  6. Within this Report it will state that an attachment has been excluded as it matched a Global Exclusion.

  7. When you check the email you will that this attachment was not included.