JEMH: Field based on catch mail address?

Sebastian Baehr February 8, 2017

Hello,


I have Support Emails from two email addresses running into one JIRA project using JEMH.
To do this, I'm forwarding the emails from email2@domain.com to email1@domain.com, and entered both into the "Catch Email Address" field in the JEMH Project Settings.
However I would like to differentiate the Issues based on which address the email was sent to (preferably by a field).
I currently use the following settings:

  • Sender processing: jira-user > Assign jira-users Email to Text CustomField: External Mail
  •  processing: non jira-user > Assign non jira-users Email to Text CustomField: External Mail

This creates a for each incoming mail an "External Mail" field in the issue with the senders Email address.
If I want to have a similar field for the addressee, there are the "Addressee Processing" options. According to https://thepluginpeople.atlassian.net/wiki/display/JEMH/How+do+email+address+get+mapped+to+custom+fields I have entered the following values:

  • Addressee Handling: toCustomField
  • JIRA account holders to MultiUser Custom Field: I'm not entirely sure why this is a user picker and not a field picker.
  • Assign non jira-user Email to Text CustomField: Addressee


I have correctly set the screens for the Addressee CustomField (same as for External Mail), yet it doesn't appear in the issues.
PS: email1@domain.com is also a JIRA user, email2@domain.com is not.
===========

  • What do I have to do to get the Addressee field displayed in the issues?
  • Would this even work to differentiate between email1 and email2 since they both come from the same mailbox?
  • If you can provide a solution, could this field be used to automatically assign the incoming issues to certain users?

Thanks in advance
Sebastian

 

2 answers

1 accepted

1 vote
Answer accepted
Andy Brook
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2017

> What do I have to do to get the Addressee field displayed in the issues?

Simple enough, use a Project Mapping for the target project, with a Domain rule for the inbound address in each case, then you could set the address statically for a given TEXT single line custom field.  This would then expose the TO: address in a custom field.  Then, you would be able to use that in the Event Listener.

> Would this even work to differentiate between email1 and email2 since they both come from the same mailbox?

So long as the original recipient address is listed somewhere in the email this should be possible.  Most mail servers retain the original TO: address, others put it in an additional EmailHeader (this is where the JEMH CatchEmailHeader field comes in, you nominate where to look)

> If you can provide a solution, could this field be used to automatically assign the incoming issues to certain users?

Use each domain Rule to nominate an Assignable user as the assignee in each project.

Note: the Default Project Mapping has no rules, its intentional, use a different project for the Default Project Mapping that your expected project, its there to handle addressees that are IN the catchemail list, but NOT mapped.

0 votes
Sebastian Baehr February 10, 2017

Hi Andy

Thanks so much for the help! Project Mappings were the key.

Here is my solution, for anyone interested:

  • Create a Project Mapping
    • Mapped Project: set Project
  • Create 2 Domain Mappings within the Project Mapping
    • Email domain mapping: email1/2@domain.com

    • Match against the addressee: [x]

    • User Custom Field: Addressee == email1/2

    • Assignee: set default Assignee

(Only question I have left is: What does the Event Listener have to do with this? I didn't change anything there...)

Suggest an answer

Log in or Sign up to answer