Sender email wrong since ScriptRunner upgrade to version 4.1.3.22

Hi,

since when we have upgraded to last version of ScriptRunner all our existing Script Listeners are sending email notifications with wrong email sender.

Before this upgrade all the script listeners were taking the project's default email address as sender email. Since the upgrade all the outgoing notifications are sent with the JIRA default email address.

Any suggestion?

Thank you in advance

2 answers

1 accepted

This widget could not be displayed.

The Send Custom Email has been defaulting to the mail server configured sender for a while. You can set it dynamically to the project's default email address using the mail object's setFrom method as documented at https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_dynamic_control_over_recipients_and_from.

You should be able to get the project's email address using issue.projectObject.email.

If you want to send HTML in your email, make sure to use the HTML template. You may need to wrap things in a <div> tag instead of a body tag, as I think we might insert a body tag for you by default. We also do some CSS inlining under the hood now, so you may be able to simply wrap your styles tag like WHATWG intended and let that take care of it for you.

 

This widget could not be displayed.

The same problem for css rendering.

email content is no longer recognizing the tag

<body style="font-family:calibri;font-size:16px">

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

508 views 3 18
Read article

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