Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how can I catch the sender from issues generated from incoming mail?

I configured incoming e-mail to create a new task for every e-mail recevied to a specific address of my company.
I configured this address as mail handler and I don't allowed the creation of a users for the sender - it was not needed for my solution.

I would like to retrieve the e-mail sender and store it in a custom field of my new task (not as reporter or watcher).
Is that possible?
It would be perfect be able to retrieve also the "cc" adress (if presents).

I hope you can help me.
Thank you!

1 comment

Hi @Clelia Giardina 

Full disclosure that I haven't set up an email handler in a while...

I recall when you do not create new Jira users from the sender email address, that email address is added to the end of the description field.  You could use an automation for Jira rule to find/parse that out and put it into your custom field.  Please look here to get you started with automation rules:

I believe that if you haven't selected any of the options to manage CC/BCC as Jira users, those email addresses are not saved with the created issue.

Best regards,

Hi @Bill Sheboy , thank you for your answer!
I saw that the sender is at the end on my new task.
I know Jira Automation, and I'm using it exactly for this my problem.
I will try with your suggestions to found a solution for my process.

It seems it is not so easy, because I saw many different way to trace the sender address.
I sent two different e-mail (one from my work address and one from my personal) and I cant find a rule for apply a logic:

*first case - from my working address (the same of my Jira Account)*

*second case - from my personal and external address *
[Created via e-mail received from: name surname <>]

I hoped someone had already bump into this need, and can share with me a smart way to manage this problem.

thanks for your tips!

Like # people like this

Wow, that is curious! 

Is the email address always on a separate and final line in the description?  If so, perhaps you could use the text function split() on newline to get at the last row, and then clean-up from there.  Maybe something like {{issue.description.split("\n").last}}

Try experimenting to see how that works.  And...I recommend creating a test rule on a manual trigger, and writing the results to the audit log.  Then you can work things out without needing to repeatedly send emails.  ;^)

Like Clelia Giardina likes this

Hi @Bill Sheboy 

thank you again for your tips.

I changed my automation adding a new action for retrieve the sender using the string manipulation that you suggested.
I can't understand why not for all issues created the last row of description have the syntax declared from Jira documentation (and that you linked). There are some exceptions that escape from my rule!

anyway. For now, seems I managed the most of scenarios, and that will be fine for now!

for sure, I will accept any other suggestion for my question. Even for retrieve the "cc" addresses that seems been impossible to catch!

Like # people like this


Log in or Sign up to comment