@Override
    public boolean isMailSenderDefined() {
        return emailSender != null && emailSender.canSend();
    }
This is {@link DefaultCommunicationsManager}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-notifications-api/src/main/java/org/apereo/cas/notifications/DefaultCommunicationsManager.java