protected EmailCommunicationResult sendPasswordResetConfirmationEmailToAccount(
        final String username, final String to, final RequestContext requestContext) throws Throwable {
        val reset = casProperties.getAuthn().getPm().getReset().getConfirmationMail();
        val person = resolvedPrincipal(username);
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        val locale = Optional.ofNullable(RequestContextUtils.getLocaleResolver(request))
            .map(resolver -> resolver.resolveLocale(request));
        val text = EmailMessageBodyBuilder
            .builder()
            .properties(reset)
            .parameters(Map.of("principal", person))
            .locale(locale)
            .build()
            .get();
        LOGGER.debug("Sending password reset confirmation email to [{}] for username [{}]", to, username);
        val emailRequest = EmailMessageRequest
            .builder()
            .emailProperties(reset)
            .principal(person)
            .to(List.of(to))
            .locale(locale.orElseGet(Locale::getDefault))
            .body(text)
            .build();
        return communicationsManager.email(emailRequest);
    }
This is {@link PasswordChangeAction}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-pm-webflow/src/main/java/org/apereo/cas/pm/web/flow/actions/PasswordChangeAction.java