Default subject missing in the Jenkins email

989 views Asked by At

I am adding recipients dynamically using the following in the pre-send script:

import javax.mail.Message
import javax.mail.internet.InternetAddress

msg.addRecipient(Message.RecipientType.TO, new InternetAddress('[email protected]'))

Now after adding this the email subject is missing.

How to access the default subject line that Email ext plugin generates by default.

1

There are 1 answers

0
Himanshu On

Please try adding below line to your code

msg.setSubject("Subject");