protected void sendBlind(Set<String> addresses, String subject, String body) { if (!isEnabled()) { // Printing warning since the enabled mail check should happen // as early as possible to prevent wasting resources. log.warn("sendBlind called when mail is disabled."); return; } if (addresses == null || addresses.isEmpty()) { log.debug("No emails found."); return; } for (String address : addresses) { try { // TODO: send in background thread getMailUtil().sendEmail(address, getSubjectPrefix() + subject, body, false /* not html */, null, null); } catch (Exception e) { log.error("Failed to send email: {} ", address, e); } } }