I would like to understand if we could use multiple To addresses in jira custom email handler.
I'm reading a CSV file and sending email to certain recipients if the conditions in other columns are met.
I could send email to one recipient but when I use multiple "To addresses", separated by comma, I get invalid email address error.
Below is my email handler function. Please help me out here.
def sendEmail(String emailAddr, String subject, String body) {
SMTPMailServer mailServer = ComponentAccessor.getMailServerManager().getDefaultSMTPMailServer()
if (mailServer) {
Email email = new Email(emailAddr)
email.setMimeType("text/html")
email.setSubject(subject)
email.setBody(body)
mailServer.send(email)
}