Exemplo n.º 1
0
  protected void sendResetPasswordEmail(User user, String newPassword) {
    Person person = (Person) Component.getInstance(Person.class);
    person.setFirstName(user.getFirstName());
    person.setAddress(user.getEmail());
    person.setPassword(newPassword);

    MailSender mailSender = (MailSender) Component.getInstance(MailSender.class);
    mailSender.sendResetPassword();
  }
Exemplo n.º 2
0
  protected void sendNewRegistrationEmail(User user, String password) {
    Person person = (Person) Component.getInstance(Person.class);
    person.setFirstName(user.getFirstName());
    person.setAddress(user.getEmail());
    person.setUserId(user.getId());
    person.setPassword(password);

    MailSender mailSender = (MailSender) Component.getInstance(MailSender.class);
    mailSender.sendNewUser();
  }
Exemplo n.º 3
0
  protected void notifySupport(SystemException e) {
    ErrorMessage errorMessage = (ErrorMessage) Component.getInstance(ErrorMessage.class);
    errorMessage.setDate(DateUtils.now(TIMESTAMP_FORMAT));
    errorMessage.setClassName(e.getClassName());
    errorMessage.setMethodName(e.getMethodName());
    errorMessage.setMessage(e.getMessage());
    errorMessage.setStackTrace(getStackTrace(e));

    MailSender mailSender = (MailSender) Component.getInstance(MailSender.class);
    mailSender.sendException();
  }