code: public boolean email(final Principal principal,
                           final String attribute,
                           final EmailProperties emailProperties,
                           final String body) {
          if (StringUtils.isNotBlank(attribute) && principal.getAttributes().containsKey(attribute) && isMailSenderDefined()) {
              val to = getFirstAttributeByName(principal, attribute);
              if (to.isPresent()) {
                  return email(emailProperties, to.get().toString(), body);
              }
          }
          LOGGER.debug("Email attribute [{}] cannot be found or no configuration for email provider is defined", attribute);
          return false;
      }
docs: Email boolean.
  
  @param principal       the principal
  @param attribute       the email attribute
  @param emailProperties the email properties
  @param body            the body
  @return true /false