}
AbstractBuild<?, ?> pb = getPreviousBuild(context.getBuild(), context.getListener());
if (pb != null) {
// Send mails as replies until next successful build
MailMessageIdAction b = pb.getAction(MailMessageIdAction.class);
if (b != null && pb.getResult() != Result.SUCCESS) {
debug(context.getListener().getLogger(), "Setting In-Reply-To since last build was not successful");
msg.setHeader("In-Reply-To", b.messageId);
msg.setHeader("References", b.messageId);
}