Postfunction Send a custom email with ScriptRunner doesn't work


I have added a postfunction "ScriptRunner workflow function - Send a custom email".

When i preview the result on a specific issue it's work.

After some test when i go to the postfunction i see that "No failures in the last 4 execution(s)".

But the notification never arrived.

I have put into the condition and configuration field : == 'Invoice'


I have put into the email template field :

Dear ${issue.assignee?.displayName},

The ${} <a href = "${baseurl}/browse/${issue.getKey()}">${issue.key}</a> has been assigned to you.

</br>Description: $issue.description

<% if (mostRecentComment)
    out << "Last comment: " << mostRecentComment



I have put into the subject template field :

Issue $issue requires your approval

I have put inzo the To issue fields field :


Does any one can help me ?



1 answer

1 accepted

Hi Stéphane,

Are you using Jira Sever or Jira Cloud? I have tested a post-function on server according to your specifications and it works for me.

Could you go to the workflow step that you've added the post-function on and ensure that the post-function is the last item to be executed on the workflow step? If the post-function is not the last item, could you move it down?

Screen Shot 2017-10-10 at 8.34.39 AM.png

I use Jira server and in fact I'm sorry it works fine.

It's just that our new testing machine has not been connected with an SMTP server.

I am really sorry.

Hi Stéphane,

No worries :)

I am glad you found your problem.

Thanks for using ScriptRunner!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 12 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

36 views 0 5
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you