[ https://issues.jenkins-ci.org/browse/JENKINS-13819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163020#comment-163020 ]
Slide-O-Mix commented on JENKINS-13819: --------------------------------------- Hmmm, that is odd...that is around this code (roughly) // Set the contents of the email msg.setSentDate(new Date()); setSubject(type, build, msg, charset); Which would seem to me that the msg is not getting allocated. Can you provide your config.xml for your job? > 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