Change default Reply-To header to $DEFAULT_REPLYTO.

See also https://issues.jenkins-ci.org/browse/JENKINS-17733.

Change-Id: I97c2f2824a8fa74f6387301d29594c59cd73a45a
Closes-Bug: 1290382
This commit is contained in:
Randy Coulman 2014-03-10 07:19:40 -07:00
parent e1ddd23483
commit 5374e3c54b
3 changed files with 39 additions and 2 deletions

View File

@ -1346,7 +1346,7 @@ def email_ext(parser, xml_parent, data):
:arg str recipients: Comma separated list of emails
:arg str reply-to: Comma separated list of emails that should be in
the Reply-To header for this project (default $DEFAULT_RECIPIENTS)
the Reply-To header for this project (default $DEFAULT_REPLYTO)
:arg str content-type: The content type of the emails sent. If not set, the
Jenkins plugin uses the value set on the main configuration page.
Possible values: 'html', 'text' or 'default' (default 'default')
@ -1455,7 +1455,7 @@ def email_ext(parser, xml_parent, data):
XML.SubElement(emailext, 'attachBuildLog').text = \
str(data.get('attach-build-log', False)).lower()
XML.SubElement(emailext, 'replyTo').text = data.get('reply-to',
'$DEFAULT_RECIPIENTS')
'$DEFAULT_REPLYTO')
matrix_dict = {'both': 'BOTH',
'only-configurations': 'ONLY_CONFIGURATIONS',
'only-parent': 'ONLY_PARENT'}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<publishers>
<hudson.plugins.emailext.ExtendedEmailPublisher>
<recipientList>$DEFAULT_RECIPIENTS</recipientList>
<configuredTriggers>
<hudson.plugins.emailext.plugins.trigger.FailureTrigger>
<email>
<recipientList/>
<subject>$PROJECT_DEFAULT_SUBJECT</subject>
<body>$PROJECT_DEFAULT_CONTENT</body>
<sendToRequester>false</sendToRequester>
<sendToDevelopers>false</sendToDevelopers>
<includeCulprits>false</includeCulprits>
<sendToRecipientList>true</sendToRecipientList>
</email>
</hudson.plugins.emailext.plugins.trigger.FailureTrigger>
</configuredTriggers>
<contentType>text/html</contentType>
<defaultSubject>Subject for Build ${BUILD_NUMBER}</defaultSubject>
<defaultContent>The build has finished</defaultContent>
<attachmentsPattern>*/foo*.log</attachmentsPattern>
<presendScript/>
<attachBuildLog>false</attachBuildLog>
<replyTo>$DEFAULT_REPLYTO</replyTo>
<matrixTriggerMode>ONLY_CONFIGURATIONS</matrixTriggerMode>
</hudson.plugins.emailext.ExtendedEmailPublisher>
</publishers>
</project>

View File

@ -0,0 +1,8 @@
publishers:
- email-ext:
content-type: html
subject: Subject for Build ${BUILD_NUMBER}
body: The build has finished
attach-build-log: false
attachments: "*/foo*.log"
matrix-trigger: only-configurations