Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ScriptRunner for JIRA
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.mail.Email
def sendEmail(String emailAddr, String subject, String body) {
def mailServer = ComponentAccessor.getMailServerManager().getDefaultSMTPMailServer()
if (mailServer) {
email = new Email(emailAddr)
email.setMimeType("text/html; charset=utf-8")
log.debug("Mail sent")
} else {
log.warn("Please make sure that a valid mailServer is configured")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.