Source:
public String receiveFeedback(HttpServletRequest request, HttpServletResponse response, Model model, @SiteParam Site site, @RequestParam("fromEmailAddress") String fromEmailAddress, @RequestParam("note") String note, @RequestParam("subject") String subject, @RequestParam("name") String name, @RequestParam("userId") String userId, @RequestParam(RECAPTCHA_CHALLENGE_FIELD) String captchaChallenge, @RequestParam(RECAPTCHA_RESPONSE_FIELD) String captchaResponse) throws IOException, MessagingException { validateFeedbackConfig(site); model.addAttribute("fromEmailAddress", fromEmailAddress); model.addAttribute("note", note); model.addAttribute("name", name); model.addAttribute("subject", subject); Set<String> errors = validateInput(fromEmailAddress, note, subject, name); if (!captchaService.validateCaptcha(site, request.getRemoteAddr(), captchaChallenge, captchaResponse)) { errors.add("captchaError"); } if (!errors.isEmpty()) { errors.forEach(error -> model.addAttribute(error, true)); response.setStatus(HttpStatus.BAD_REQUEST.value()); return serveFeedbackPage(model, site); } if (subject.isEmpty()) { model.addAttribute("subject", (String) getFeedbackConfig(site).get("defaultSubject")); } model.addAttribute("id", userId); model.addAttribute("userInfo", formatUserInfo(request)); Multipart content = freemarkerMailService.createContent(site, "feedback", model); String destinationAddress = (String) getFeedbackConfig(site).get("destination"); EmailMessage message = EmailMessage.builder() .addToEmailAddress(EmailMessage.createAddress(null, destinationAddress)) .setSenderAddress(EmailMessage.createAddress(name, fromEmailAddress)) .setSubject(subject) .setContent(content) .setEncoding(freeMarkerConfig.getConfiguration().getDefaultEncoding()) .build(); message.send(javaMailSender); return "redirect:feedback/success"; }

Target:
public String receiveFeedback(HttpServletRequest request, HttpServletResponse response, Model model, @SiteParam Site site, @RequestParam("fromEmailAddress") String fromEmailAddress, @RequestParam("note") String note, @RequestParam("subject") String subject, @RequestParam("name") String name, @RequestParam("userId") String userId, @RequestParam(RECAPTCHA_CHALLENGE_FIELD) String captchaChallenge, @RequestParam(RECAPTCHA_RESPONSE_FIELD) String captchaResponse) throws IOException, MessagingException { enforceDevFeature("feedback"); validateFeedbackConfig(site); model.addAttribute("fromEmailAddress", fromEmailAddress); model.addAttribute("note", note); model.addAttribute("name", name); model.addAttribute("subject", subject); Set<String> errors = validateInput(fromEmailAddress, note, subject, name); if (!captchaService.validateCaptcha(site, request.getRemoteAddr(), captchaChallenge, captchaResponse)) { errors.add("captchaError"); } if (applyValidation(response, model, errors)) { return serveFeedbackPage(model, site); } if (subject.isEmpty()) { model.addAttribute("subject", (String) getFeedbackConfig(site).get("defaultSubject")); } model.addAttribute("id", userId); model.addAttribute("userInfo", formatUserInfo(request)); Multipart content = freemarkerMailService.createContent(site, "feedback", model); String destinationAddress = (String) getFeedbackConfig(site).get("destination"); EmailMessage message = EmailMessage.builder() .addToEmailAddress(EmailMessage.createAddress(null, destinationAddress)) .setSenderAddress(EmailMessage.createAddress(name, fromEmailAddress)) .setSubject(subject) .setContent(content) .setEncoding(freeMarkerConfig.getConfiguration().getDefaultEncoding()) .build(); message.send(javaMailSender); return "redirect:feedback/success"; }