Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Mailhandler Script Runner

dD
Contributor
February 15, 2022

Hello Community,

in my organisation we use a mailhandler to create some tickets. A person sends a message to a specific mailadress and a ticket is created. We use the existing Create a new issue or add a comment to an existing issue - Mailhandler.

For some cases the person has no jiar account. We have also no licenses left to automatically create a account, which is not a problem. But we need the email adress of the person as a value in a CF on that ticket, in order to answer with a response. Therefore we did a workaround, where the person types its mailadress in the body of the mail and when the ticket is being created, the mailadress will be safed in a CF named mailadress

Although this works, it is really a unattractive way and we would like to automate this. The mailhandler should automatically read the mailadress and safe it in the designed CF. How is that possible? Are there scriptrunner templates ready to use? 

1 answer

0 votes
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2022

Hi @dD 

You won't be able to get access to the email via  standard handler.

The Scriptrunner email handler will allow to to work with the message data to customise how it is handler i.e. add the sender email to a custom field

Screenshot 2022-02-15 at 15.31.38.png

Are you looking for details on how to write that script?

dD
Contributor
February 21, 2022

Hi @Tom Lister thank you for your reply.

I am looking for a script, that does the same as the standard mailhandler (--> Create a new issue or add a comment to an existing issue) but also safes the mailadress in a customfield.

Best Daniel

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 21, 2022

Hi @dD 

I don't have access to a server instance at the moment. I'm focussing on cloud features and Scriptrunner doesn't support this function in cloud. So I'm not in a position to setup an example for you.

Check the Scriptrunner documentation for their examples:

https://docs.adaptavist.com/sr4js/latest/features/mail-handler/mail-handler-examples

These contain examples of most of the tasks you will need to script.

Also worth checking is the Adaptavist library:

https://library.adaptavist.com/search?page=1&term=email

dD
Contributor
February 21, 2022

ok thanks

Suggest an answer

Log in or Sign up to answer