mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Sending email only when the mail transport is enabled.
This commit is contained in:
parent
3edc71f04d
commit
a1d6065c75
@ -71,12 +71,14 @@ public class EmailSenderServiceImpl implements EmailSenderService {
|
|||||||
if(EmailSenderDataHolder.getInstance().getConfigurationContextService()
|
if(EmailSenderDataHolder.getInstance().getConfigurationContextService()
|
||||||
.getServerConfigContext().getAxisConfiguration().getTransportOut(transportSenderName) == null){
|
.getServerConfigContext().getAxisConfiguration().getTransportOut(transportSenderName) == null){
|
||||||
log.warn("Email invitation is not sent as the email is not configured.");
|
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) {
|
} 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);
|
||||||
}
|
}
|
||||||
threadPoolExecutor.submit(new EmailSender(recipient, emailData.getSubject(), emailData.getBody()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user