![](/img/trans.png)
[英]How to set programmatically recipients of Jenkins Email-ext plugin?
[英]How to set from address in Jenkins with email-ext plugin?
我們使用Jenkins管道,並通過emailext選項設置from:
def subject = "JENKINS-NOTIFICATION: ${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
emailext(
mimeType: 'text/html',
replyTo: '$DEFAULT_REPLYTO',
subject: subject,
from: 'jenkins@host.com',
to: 'dummy@corp.com',
body: '${SCRIPT,template="email.template"}',
attachLog: true,
compressLog: true,
recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
另請參見可定義選項的文檔 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.