@Override
    public String get() {
        if (StringUtils.isBlank(properties.getText())) {
            LOGGER.warn("No email body is defined");
            return StringUtils.EMPTY;
        }
        try {
            val scriptFactoryInstance = ExecutableCompiledScriptFactory.findExecutableCompiledScriptFactory();

            if (scriptFactoryInstance.isPresent()) {
                val scriptFactory = scriptFactoryInstance.get();
                if (scriptFactory.isScript(properties.getText())) {
                    val cacheMgr = ApplicationContextProvider.getScriptResourceCacheManager().orElseThrow();
                    val script = cacheMgr.resolveScriptableResource(properties.getText(), properties.getText());
                    val args = scriptFactory.isInlineScript(properties.getText())
                        ? new HashMap<>(this.parameters)
                        : CollectionUtils.<String, Object>wrap("parameters", this.parameters);
                    args.put("logger", LOGGER);
                    locale.ifPresent(loc -> args.put("locale", loc));
                    script.setBinding(args);
                    return script.execute(args.values().toArray(), String.class);
                }
            }

            val templateFile = determineEmailTemplateFile();
            LOGGER.debug("Using email template file at [{}]", templateFile);
            val contents = FileUtils.readFileToString(templateFile, StandardCharsets.UTF_8);
            if (templateFile.getName().endsWith(".gtemplate") && scriptFactoryInstance.isPresent()) {
                val templateParams = new LinkedHashMap<>(this.parameters);
                locale.ifPresent(loc -> templateParams.put("locale", loc));
                return scriptFactoryInstance.get().createTemplate(contents, templateParams);
            }

            return formatEmailBody(contents);
        } catch (final Throwable e) {
            LOGGER.trace(e.getMessage(), e);
            return formatEmailBody(properties.getText());
        }
    }
Add parameter.

@param key    the key
@param object the object
@return the email message body builder
core/cas-server-core-notifications-api/src/main/java/org/apereo/cas/notifications/mail/EmailMessageBodyBuilder.java