Skip to content

Instantly share code, notes, and snippets.

View atural91's full-sized avatar

Tural Aliyev atural91

View GitHub Profile
@ansig
ansig / sendMail.groovy
Last active September 16, 2020 15:44
Send a mail from Jenkins in Groovy Script Console
import javax.mail.Session
import javax.mail.Message
import javax.mail.Transport
import javax.mail.internet.MimeMessage
import javax.mail.internet.InternetAddress
def descriptor = Jenkins.instance.getDescriptor("hudson.tasks.Mailer")
Session session = descriptor.createSession();