protected List<String> getEmailMessageRecipients(final Principal principal, final RequestContext requestContext) {
        return properties.getMail().getAttributeName()
            .stream()
            .map(attribute -> EmailMessageRequest.builder()
                .emailProperties(properties.getMail())
                .principal(principal)
                .tenant(tenantExtractor.extract(requestContext).map(TenantDefinition::getId).orElse(StringUtils.EMPTY))
                .attribute(SpringExpressionLanguageValueResolver.getInstance().resolve(attribute))
                .build()
                .getRecipients())
            .flatMap(List::stream)
            .distinct()
            .collect(Collectors.toList());
    }
This is {@link CasSimpleMultifactorSendEmail}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-simple-mfa-core/src/main/java/org/apereo/cas/mfa/simple/web/flow/CasSimpleMultifactorSendEmail.java