code: @SuppressWarnings("squid:S3457") // do not use platform specific line ending
    private SimpleMailMessage createFeedbackMessage(FeedbackForm form) {
      SimpleMailMessage message = new SimpleMailMessage();
      message.setTo(userService.getSuEmailAddresses().toArray(new String[] {}));
      if (form.hasEmail()) {
        message.setCc(form.getEmail());
        message.setReplyTo(form.getEmail());
      } else {
        message.setReplyTo("no-reply@molgenis.org");
      }
      String appName = appSettings.getTitle();
      message.setSubject(String.format("[feedback-%s] %s", appName, form.getSubject()));
      message.setText(String.format("Feedback from %s:\n\n%s", form.getFrom(), form.getFeedback()));
      return message;
    }
docs: Creates a MimeMessage based on a FeedbackForm.