if (transientFailures.isEmpty())
return;
Period waitingPeriod = retryPeriods.get(mail.deliveryAttempts - 1);
Instant newScheduleDate =
new DateTime().plus(waitingPeriod).toInstant();
mail.scheduleDate = newScheduleDate.toDate();
mail.recipients = calculateTemporarilyRejectedRecipientList();
retryTransmitter.transmit(mail);
logger.debug("Transient failure, the mail is scheduled for a "
+ (mail.deliveryAttempts + 1) + ". attempt "
+ waitingPeriod + " later on " + newScheduleDate);