Hi Guys,
Need help!
I am using post function Script Custom Email. But default system is sending from jira@noreply.com . I want to change from Email Address in Scripted Custom Email. How can i change from . Kindly suggest.
Thanks!
Do you mean "Send a custom email [ScriptRunner]"? If so, in the "Condition and Configuration" section you can modify the predefined "mail" variable like so:
mail.setFrom("somebody@gmail.com")
See this documentation and note there are several set___() methods.
Hi @Payne Thanks for your response. I was not aware where to add mail.setFrom , i was adding in Body..not tried in condition and configuration.
It's fixed now. I have set reporter in setFrom.
import com.atlassian.mail.Emailmail.setFrom("$issue.reporter.emailAddress")mail.setReplyTo("$issue.reporter.emailAddress")
Hello @Payne One last question realated to same issue.
Now email is going through from reporter email address.
I want to add comment as well JIRA issue. Like when someone complete the task and reply on the same email shooted from jira. Then how reply of an email added as comment in same JIRA issue ? Kindly suggest
Thanks
There is another predefined variable, lastComment that contains the comment made during this transition, or null if there is not one. You can use that variable in the Email Template as $lastComment, perhaps checking for null and not displaying it if that is the case.
It looks like you're new here. Sign in or register to get started.