Forums

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

Scriptrunner - send to e-mail - Reply-to email address

Jean Freitas May 25, 2018

Hi,

I'm using Scriptrunner built in script (Send to e-mail) in my workflow. There is a field in that script settings which allows to set the Reply-to email address. Is possible reply to the e-mail address of the user who is transitioning the issue (and triggering that script)?

 

Thank you.

1 answer

1 vote
Payne
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.
May 25, 2018

Hi Jean,

We do something similar at our organization. Rather than setting reply-to (and from) to the person making the transition, we set it to the current assignee (who, in our workflow, is generally the same person). Rather than using the reply-to field, set the attribute(s) of the predefined mail object in the "Condition and Configuration" section as follows:

String assigneeName = issue.getAssignee().getDisplayName()
String assigneeEmail = issue.getAssignee().getEmailAddress()

mail.setFrom(assigneeEmail)
mail.setFromName(assigneeName)
mail.setReplyTo(assigneeEmail)

I'm not sure if the user making the transition is accessible programmatically (probably), but if so, you could do something very similar with that user rather than the assignee.

Hope this helps,
Payne

Jean Freitas May 28, 2018

Hi Payne,

 

Thank you very much for sharing your solution! I'll try adapt it to our needs and let you know how that go.


But just for looking here it makes a lot of sense and will probably work.

 

Thanks again!

Suggest an answer

Log in or Sign up to answer