use of com.google.gerrit.server.mail.send.InboundEmailRejectionSender in project gerrit by GerritCodeReview.
the class MailProcessor method sendRejectionEmail.
private void sendRejectionEmail(MailMessage message, InboundEmailError reason) {
try {
InboundEmailRejectionSender emailSender = emailRejectionSender.create(message.from(), message.id(), reason);
emailSender.setMessageId(messageIdGenerator.fromMailMessage(message));
emailSender.send();
} catch (Exception e) {
logger.atSevere().withCause(e).log("Cannot send email to warn for an error");
}
}
Aggregations