I had tried it both with and without the plugin version, and it made no difference.
def addExtendedEmailPlugin(jobObj, vars) {
jobObj.publishers {
trigger(triggerName: "Success", subject: "SuccessSubject", body: "SuccessBody", recipientList: "som...@email.com", sendToDevelopers: false, sendToRequester: false, includeCulprits: false, sendToRecipientList: true)
}
}
}
That generates this XML:
<hudson.plugins.emailext.ExtendedEmailPublisher>
<contentType>default</contentType>
<defaultSubject>defaultSubject</defaultSubject>
<defaultContent>defaultContent</defaultContent>
<attachmentsPattern/>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
<email>
<subject>SuccessSubject</subject>
<body>SuccessBody</body>
<sendToDevelopers>false</sendToDevelopers>
<sendToRequester>false</sendToRequester>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.SuccessTrigger>
</configuredTriggers>
</hudson.plugins.emailext.ExtendedEmailPublisher>
Which seems like it should be fine. It is not as close to what I get using the UI (for example, that includes a <recipientProvider> pair, but I have no idea what that is, of course), but it also doesn't work. I generate the job, check the XML, and find the above, but when I look at the configuration screen or run the job, it's not there.