private boolean tryToSendSms(final RequestContext requestContext,
                                 final EnumSet<TokenSharingStrategyOptions> communicationStrategy,
                                 final Principal principal,
                                 final Map<TokenSharingStrategyOptions, List<String>> mapOfAllRecipients,
                                 final CasSimpleMultifactorAuthenticationTicket token) {
        if (communicationStrategy.contains(TokenSharingStrategyOptions.SMS) && communicationsManager.isSmsSenderDefined()) {
            val cmd = CasSimpleMultifactorSendSms.of(communicationsManager, properties);
            val recipients = cmd.getSmsRecipients(principal);
            if (!recipients.isEmpty()) {
                mapOfAllRecipients.put(TokenSharingStrategyOptions.SMS, recipients);
            }

            if (recipients.size() > 1) {
                val selectedSmsRecipients = findSelectedSmsRecipients(requestContext, principal);
                LOGGER.debug("Selected SMS recipients are [{}]", selectedSmsRecipients);
                if (!selectedSmsRecipients.isEmpty()) {
                    val smsSent = cmd.send(principal, token, requestContext, selectedSmsRecipients);
                    if (!smsSent) {
                        WebUtils.addErrorMessageToContext(requestContext, MESSAGE_MFA_CONTACT_FAILED_SMS);
                    }
                    return smsSent;
                }
            } else {
                val smsSent = cmd.send(principal, token, requestContext);
                if (!smsSent) {
                    WebUtils.addErrorMessageToContext(requestContext, MESSAGE_MFA_CONTACT_FAILED_SMS);
                }
                return smsSent;
            }
        }
        return false;
    }
Event attribute to allow registration of email.
support/cas-server-support-simple-mfa-core/src/main/java/org/apereo/cas/mfa/simple/web/flow/CasSimpleMultifactorSendTokenAction.java