[ https://issues.jenkins-ci.org/browse/JENKINS-13819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163023#comment-163023 ]
Jason Swager commented on JENKINS-13819: ---------------------------------------- Here's the email-ext part of the config.xml file. Email addresses modified for corporate policy (ya know, the legal mumbo jumbo...). TEST_NOTIFY is a parameter to the build, intended to be an optional list of additional email addresses. <hudson.plugins.emailext.ExtendedEmailPublisher> <recipientList>$TEST_NOTIFY</recipientList> <configuredTriggers> <hudson.plugins.emailext.plugins.trigger.UnstableTrigger> <email> <recipientList>a...@test.com,b...@test.com,c...@test.com</recipientList> <subject>SOME TEST FAILURES: ${PROJECT_DEFAULT_SUBJECT}</subject> <body>Not all tests passed. $PROJECT_DEFAULT_CONTENT</body> <sendToDevelopers>true</sendToDevelopers> <sendToRequester>true</sendToRequester> <includeCulprits>false</includeCulprits> <sendToRecipientList>true</sendToRecipientList> </email> </hudson.plugins.emailext.plugins.trigger.UnstableTrigger> <hudson.plugins.emailext.plugins.trigger.FailureTrigger> <email> <recipientList>a...@test.com,b...@test.com,c...@test.com</recipientList> <subject>TESTS FAILED TO RUN: ${PROJECT_DEFAULT_SUBJECT}</subject> <body>The tests did not complete as expected. $PROJECT_DEFAULT_CONTENT</body> <sendToDevelopers>true</sendToDevelopers> <sendToRequester>true</sendToRequester> <includeCulprits>false</includeCulprits> <sendToRecipientList>true</sendToRecipientList> </email> </hudson.plugins.emailext.plugins.trigger.FailureTrigger> <hudson.plugins.emailext.plugins.trigger.SuccessTrigger> <email> <recipientList></recipientList> <subject>ALL TESTS PASSED: ${PROJECT_DEFAULT_SUBJECT}</subject> <body>All tests passed! $PROJECT_DEFAULT_CONTENT</body> <sendToDevelopers>true</sendToDevelopers> <sendToRequester>true</sendToRequester> <includeCulprits>false</includeCulprits> <sendToRecipientList>true</sendToRecipientList> </email> </hudson.plugins.emailext.plugins.trigger.SuccessTrigger> </configuredTriggers> <contentType>default</contentType> <defaultSubject>${PROJECT_NAME} ${BUILD_NUMBER}</defaultSubject> <defaultContent>Status: ${BUILD_STATUS} Job: ${BUILD_URL} Console: ${BUILD_URL}console</defaultContent> <attachmentsPattern></attachmentsPattern> </hudson.plugins.emailext.ExtendedEmailPublisher> > email notification can not send out whether the build is success or failed > --------------------------------------------------------------------------- > > Key: JENKINS-13819 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13819 > Project: Jenkins > Issue Type: Bug > Components: email-ext > Environment: Jenkins version:1.428 > Reporter: pangpang wanzi > Assignee: Slide-O-Mix > Labels: email-ext, jenkins, plugin > Attachments: config.xml, screenshot-1.jpg > > > Email can not send out, error info as follows: > Email was triggered for: Success > Sending email for trigger: Success > ERROR: Could not send email as a part of the post-build publishers. > java.lang.NullPointerException > or > Email was triggered for: Success > Sending email for trigger: Success > ERROR: Could not send email as a part of the post-build publishers. > java.lang.NullPointerException > at java.util.regex.Matcher.quoteReplacement(Matcher.java:598) > at > hudson.plugins.emailext.plugins.ContentBuilder$Tokenizer.appendReplacement(ContentBuilder.java:195) > at > hudson.plugins.emailext.plugins.ContentBuilder.replaceTokensWithContent(ContentBuilder.java:96) > at > hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:67) > at > hudson.plugins.emailext.ExtendedEmailPublisher.setContent(ExtendedEmailPublisher.java:369) > at > hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:274) > at > hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:220) > at > hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:212) > at > hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:174) > at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) > at > hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) > at > hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) > at > hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) > at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171) > at hudson.model.Run.run(Run.java:1420) > at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) > at hudson.model.ResourceController.execute(ResourceController.java:88) > at hudson.model.Executor.run(Executor.java:230) > Finished: SUCCESS -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira