protected MailProperties findTenantEmailProperties(
        final EmailMessageRequest emailMessageRequest) {
        return tenantExtractor.getTenantsManager()
            .findTenant(emailMessageRequest.getTenant())
            .map(tenantDefinition -> tenantDefinition.bindPropertiesTo(MailProperties.class))
            .filter(ConfigurationPropertiesBindingContext::isBound)
            .filter(bindingContext -> bindingContext.containsBindingFor(MailProperties.class))
            .map(ConfigurationPropertiesBindingContext::value)
            .orElse(mailProperties);
    }
This is {@link DefaultEmailSender}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-notifications-api/src/main/java/org/apereo/cas/notifications/mail/DefaultEmailSender.java