This is an old question, and you probably already found your own workaround, but I had a similar need, and I thought I would share my solution anyway. What I was trying to do was generate a one-time email of tasks in a failed state. This is basically very similar to sending a success report once a day for one job.
My solution uses the Groovy build step in conjunction with the Email Sub Ext plugin pre-send feature. I got the idea from the Nabble thread mentioned in the comments above. See Also Email-Ext Recipes on Jenkins website.
Here's the initial Groovy script, which determines which builds fail, configured in Run Groovy Script System . You could do something like this to determine if your creation was successful or unsuccessful:
// List the names of jobs you want to ignore for this check ignore = [ ] // Find all failed and unstable jobs failed = hudson.model.Hudson.instance.getView("All").items.findAll{ job -> job.getDisplayName() != "Daily Jenkins Job Nag" && !ignore.contains(job.getDisplayName()) && job.isBuildable() && job.lastCompletedBuild && (job.lastCompletedBuild.result == hudson.model.Result.FAILURE || job.lastCompletedBuild.result == hudson.model.Result.UNSTABLE) } // Log the job names so the build results are legible failed.each { job -> println(job.getDisplayName() + " " + job.lastCompletedBuild.result + " at build " + job.lastCompletedBuild.number + " (" + job.lastCompletedBuild.timestamp.format("yyyy-MM-dd'T'HH:mm ZZZZ") + ")"); } // Return failure if there are any failed jobs return failed.size
Then, in the Editable Email Notification section, I installed the Email-Ext plugin for error notification. I set the Content Type to plain text (text / plain), left the Content blank by default, and set the following as Pre-send Script :
failed = hudson.model.Hudson.instance.getView("All").items.findAll{ job -> job.getDisplayName() != "Daily Jenkins Job Nag" && job.isBuildable() && job.lastCompletedBuild && (job.lastCompletedBuild.result == hudson.model.Result.FAILURE || job.lastCompletedBuild.result == hudson.model.Result.UNSTABLE) } def output = StringBuilder.newInstance() output << "<html>\n" output << " <body>\n" output << "<p>Jenkins reports the following failed jobs:</p>" output << " <ul>\n" failed.each { job -> url = hudson.model.Hudson.instance.rootUrl + job.url + "/" + job.lastCompletedBuild.number + "/" output << " <li>" output << "<a href=\"" + url + "\">" + job.displayName + "</a>" output << " " + job.lastCompletedBuild.result output << " at build " + job.lastCompletedBuild.number output << " (" + job.lastCompletedBuild.timestamp.format("yyyy-MM-dd'T'HH:mm ZZZZ") + ")" output << "</li>\n" } output << " </ul>\n" output << " </body>\n" output << "</html>" msg.setContent(output.toString(), "text/html")
The key is that you have access to the msg object, which is MimeMessage . You can set the content of the MIME message at any time convenient for you.
In this case, I create a list of unsuccessful tasks, but in your case it will be any message that you want to receive for your report on the results once a day. Depending on what you need, you can send an Email-Ext result for each assembly, and not just for failed assemblies.