Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to set FROM in Script Custom Email post function

Hi Guys,

Need help!

I am using post function  Script Custom Email. But default system is sending from . I want to change from Email Address in Scripted Custom Email. How can i change from . Kindly suggest.



1 answer

1 accepted

1 vote
Answer accepted
Payne Community Leader Jun 01, 2021

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:


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.Email


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



Payne Community Leader Jun 02, 2021

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.

Hi @Payne I think I am not able to explain my issue correctly. 
I want to add comment in jira issue when some one reply on the email which sent from JIRA where from is reporter . If reply back to reporter email then that reply added to comment ? 

Payne Community Leader Jun 02, 2021

Ah, that's a totally different topic. You may wish to create a new question about that particular issue.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you