@Override
    public String findEmail(final PasswordManagementQuery query) {
        val email = findAttribute(query, casProperties.getAuthn().getPm().getReset().getMail().getAttributeName(),
            CollectionUtils.wrap(query.getUsername()));
        if (EmailValidator.getInstance().isValid(email)) {
            LOGGER.debug("Email address [{}] for [{}] appears valid", email, query.getUsername());
            return email;
        }
        LOGGER.warn("Email address [{}] for [{}] is not valid", email, query.getUsername());
        return null;
    }
This is {@link LdapPasswordManagementService}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-pm-ldap/src/main/java/org/apereo/cas/pm/LdapPasswordManagementService.java