|
|
@ -65,8 +65,13 @@ public class EmailSenderServiceImpl implements EmailSenderService {
|
|
|
|
for (String recipient : emailCtx.getRecipients()) {
|
|
|
|
for (String recipient : emailCtx.getRecipients()) {
|
|
|
|
ContentProviderInfo info = emailCtx.getContentProviderInfo();
|
|
|
|
ContentProviderInfo info = emailCtx.getContentProviderInfo();
|
|
|
|
EmailData emailData;
|
|
|
|
EmailData emailData;
|
|
|
|
|
|
|
|
String transportSenderName = "mailto";
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
emailData = contentProvider.getContent(info.getTemplate(), info.getParams());
|
|
|
|
emailData = contentProvider.getContent(info.getTemplate(), info.getParams());
|
|
|
|
|
|
|
|
if(EmailSenderDataHolder.getInstance().getConfigurationContextService()
|
|
|
|
|
|
|
|
.getServerConfigContext().getAxisConfiguration().getTransportOut(transportSenderName) == null){
|
|
|
|
|
|
|
|
throw new EmailSendingFailedException("Email transport is not configured.");
|
|
|
|
|
|
|
|
}
|
|
|
|
} catch (ContentProcessingInterruptedException e) {
|
|
|
|
} catch (ContentProcessingInterruptedException e) {
|
|
|
|
throw new EmailSendingFailedException("Error occurred while retrieving email content to be " +
|
|
|
|
throw new EmailSendingFailedException("Error occurred while retrieving email content to be " +
|
|
|
|
"sent for recipient '" + recipient + "'", e);
|
|
|
|
"sent for recipient '" + recipient + "'", e);
|
|
|
|