I have a usecase where I want to send an email to multiple users using scriptrunner in Jira Cloud. How can I achieve this ? Below is the code I am using, but it only sends the email to first user
Note : The 'to' field should have multiple users 'Shilpa Matta' and 'Second User'
def resp = post("/rest/api/2/issue/${issue.id}/notify")
.header("Content-Type", "application/json")
.body([
subject: 'New Email to multiple users',
textBody: textMessage,
htmlBody: htmlMessage,
to: [
users: [[name: 'Shilpa Matta'],[name: 'Second User']]
]
])
.asString()
assert resp.status == 204
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.