protected boolean emailToken(final RequestContext requestContext, final PasswordlessUserAccount user,
                              final PasswordlessAuthenticationToken token) {
        val passwordlessProperties = casProperties.getAuthn().getPasswordless();
        if (communicationsManager.isMailSenderDefined() && StringUtils.isNotBlank(user.getEmail())) {
            val mail = passwordlessProperties.getTokens().getMail();
            val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
            val locale = Optional.ofNullable(RequestContextUtils.getLocaleResolver(request))
                .map(resolver -> resolver.resolveLocale(request));
            val body = EmailMessageBodyBuilder.builder()
                .properties(mail)
                .locale(locale)
                .parameters(Map.of("token", token.getToken()))
                .build()
                .get();
            val emailRequest = EmailMessageRequest.builder()
                .emailProperties(mail)
                .locale(locale.orElseGet(Locale::getDefault))
                .to(List.of(user.getEmail()))
                .tenant(tenantExtractor.extract(requestContext).map(TenantDefinition::getId).orElse(StringUtils.EMPTY))
                .body(body)
                .build();
            return communicationsManager.email(emailRequest).isSuccess();
        }
        return true;
    }
This is {@link CreatePasswordlessAuthenticationTokenAction}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-passwordless-webflow/src/main/java/org/apereo/cas/web/flow/CreatePasswordlessAuthenticationTokenAction.java