public EXTermAndAgreementWizardForm() {
   super("EXTermAndAgreementWizardForm", "Terms and agreement");
   addClass("ui-wizard-terms");
   try {
     String text =
         IOUtil.getStreamContentAsString(
             Thread.currentThread()
                 .getContextClassLoader()
                 .getResourceAsStream("org/castafiore/webwizard/terms.properties"));
     EXTextArea a = new EXTextArea("agreement");
     a.setValue(text);
     getBodyContainer()
         .addChild(
             new EXContainer("sd", "h3").setText("Please read carefully the terms and agreement"));
     getBodyContainer().addChild(a);
     getBodyContainer().addChild(new EXCheckBox("agree"));
     getBodyContainer()
         .addChild(
             new EXContainer("label", "label").setText("I agree with the terms and condition"));
     setDraggable(false);
     setShowCloseButton(false);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  private static void sendMail(String person, String email) {
    String content =
        IOUtil.getStreamContentAsString(
            Thread.currentThread()
                .getContextClassLoader()
                .getResourceAsStream("com/eliensons/reminders/terminate.xhtml"));

    content = content.replace("${person}", person);

    try {
      JavaMailSender sender = SpringUtil.getBeanOfType(JavaMailSender.class);
      MimeMessage message = sender.createMimeMessage();
      MimeMessageHelper helper = new MimeMessageHelper(message, true);
      helper.setSubject("Sincere sympath from Elie and Sons");
      helper.setFrom(MallUtil.getCurrentMerchant().getEmail());
      helper.setTo(email);
      helper.setText(content, true);
      sender.send(message);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }