Sending email only when the mail transport is enabled.

4.x.x
sinthuja 7 years ago
parent 3edc71f04d
commit a1d6065c75

@ -71,12 +71,14 @@ public class EmailSenderServiceImpl implements EmailSenderService {
if(EmailSenderDataHolder.getInstance().getConfigurationContextService()
.getServerConfigContext().getAxisConfiguration().getTransportOut(transportSenderName) == null){
log.warn("Email invitation is not sent as the email is not configured.");
} else {
threadPoolExecutor.submit(new EmailSender(recipient, emailData.getSubject(), emailData.getBody()));
}
} catch (ContentProcessingInterruptedException e) {
throw new EmailSendingFailedException("Error occurred while retrieving email content to be " +
"sent for recipient '" + recipient + "'", e);
}
threadPoolExecutor.submit(new EmailSender(recipient, emailData.getSubject(), emailData.getBody()));
}
}

Loading…
Cancel
Save