Forums

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

ScriptRunner Cloud: Send notification from a specific user/email?

James N. December 26, 2018

I have a script sending a custom email whenever an issue is created on a certain project. I'd like this to come from a generic company email. Would this be possible if I created a Jira user with the intended email address?

1 answer

1 accepted

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
January 2, 2019

Hi James,

Thank you for your question. 

I can confirm that it is not possible to specify the email address that the emails is sent from using ScriptRunner for Jira Cloud as the Notify api provided by Atlassian as documented here does not provide a request property to set the from email and instead uses the mail address provided by Atlassian for your Jira Cloud instance.

This means that it is not possible to set the from email and all you could do is to add the email you want the nottification to be from to the subject or email body to show what email users should respond to.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,

Kristian

James N. January 2, 2019

Thank you for the response. I have a follow-up question to clarify.

I see that whether I choose "Run as Current User" or "Run as ScriptRunner Add-On User", the From email stays as jira@phonecom.atlassian.net. However, the From name can be "ScriptRunner for Jira (JIRA)" or "[username] (JIRA)".

Even though the email cannot be changed, is it possible to specify From name?

Kristian Walker _Adaptavist_
Community Champion
January 7, 2019

Hi James,

I can confirm that the run on user is just selecting the Jira user that executes the Script to be ran and does not impact the from email. 

Unfortantely the from name cannot be set as in the notify API used  by the script Atlassian do not provide a paramater to configure the from name or any other from properties which means that ScriptRunner cannot modify any of the from properties.

Regards,

Kristian

James N. January 7, 2019

Understood, thanks Kristian

Suggest an answer

Log in or Sign up to answer