Good afternoon community, I have a question. When sending emails with ScriptRunner, I can use groups, responsible parties, informants, etc. However, if I try to send it to a specific user's email, I get an error. Is this restricted in some way, or am I doing something wrong?
Is there a way to send the email to a user in my organization's directory? I've tried using the user's email, name, and ID, but all attempts indicate that no specific user is specified to send the email.
//Script that works
def issueKey = "SCRIP-258"
def nombreGrupo = 'Test Correo Script'
def resp = post("/rest/api/2/issue/${issueKey}/notify")
.header("Content-Type", "application/json")
.body([
subject: "Tiene asignada ${issueKey} ",
textBody: "Body",
htmlBody: "<p>Test</p>",
to: [
groups: [
[
name: "${nombreGrupo}"
]
]
]
])
.asString()
def bol = true
logger.info("Correo enviado")