Package org.olat.core.util.mail

Examples of org.olat.core.util.mail.MailTemplate


        }
      }});
   

    // 3. Send notification mail
    MailTemplate mailTemplate = BGMailHelper.createRemoveMyselfMailTemplate(enrolledGroup, identity);
    MailerWithTemplate mailer = MailerWithTemplate.getInstance();
    MailerResult mailerResult = mailer.sendMail(identity, null, null, mailTemplate, null);
    MailHelper.printErrorsAndWarnings(mailerResult, wControl, trans.getLocale());
  }
View Full Code Here


        }
      }});
   

    // 3. Send notification mail
    MailTemplate mailTemplate = BGMailHelper.createRemoveWaitinglistMailTemplate(enrolledWaitingListGroup, identity);
    MailerWithTemplate mailer = MailerWithTemplate.getInstance();
    MailerResult mailerResult = mailer.sendMail(identity, null, null, mailTemplate, null);
    MailHelper.printErrorsAndWarnings(mailerResult, wControl, trans.getLocale());
  }
View Full Code Here

    } else {
      thisTime.setStringValue(nowString);
      coursePropertyManager.updateProperty(thisTime);
    }
    // 4. Send notification mail
    MailTemplate mailTemplate = BGMailHelper.createAddMyselfMailTemplate(group, identity);
    MailerWithTemplate mailer = MailerWithTemplate.getInstance();
    MailerResult mailerResult = mailer.sendMail(identity, null, null, mailTemplate, null);
    MailHelper.printErrorsAndWarnings(mailerResult, wControl, trans.getLocale());

View Full Code Here

    } else {
      thisTime.setStringValue(nowString);
      coursePropertyManager.updateProperty(thisTime);
    }   
    // 4. Send notification mail
    MailTemplate mailTemplate = BGMailHelper.createAddWaitinglistMailTemplate(group, identity);
    MailerWithTemplate mailer = MailerWithTemplate.getInstance();
    MailerResult mailerResult = mailer.sendMail(identity, null, null, mailTemplate, null);
    MailHelper.printErrorsAndWarnings(mailerResult, wControl, trans.getLocale());

    return true;
View Full Code Here

          // send email if necessary
          Boolean sendEmail = (Boolean)config.get(TACourseNode.CONF_DROPBOX_ENABLEMAIL);
          if (sendEmail == null) sendEmail = Boolean.FALSE;
          boolean sendMailError = false;
          if (sendEmail.booleanValue()) {
            MailTemplate mailTempl = new MailTemplate(translate("conf.mail.subject"), confirmation, null) {

              @Override
              public void putVariablesInMailContext(VelocityContext context, Identity recipient) {
                // nothing to do
              }
View Full Code Here

    accountManagerGroup = ProjectBrokerManagerFactory.getProjectGroupManager().getAccountManagerGroupFor(cpm, node, course, groupName, groupDescription, ureq.getIdentity());
    if (accountManagerGroup != null) {
      accountManagerGroupController = new GroupController(ureq, getWindowControl(), true, false, true, accountManagerGroup.getPartipiciantGroup());
      listenTo(accountManagerGroupController);
      // add mail templates used when adding and removing users
      MailTemplate ownerAddUserMailTempl = BGMailHelper.createAddParticipantMailTemplate(accountManagerGroup, ureq.getIdentity());
      accountManagerGroupController.setAddUserMailTempl(ownerAddUserMailTempl);
      MailTemplate ownerAremoveUserMailTempl = BGMailHelper.createRemoveParticipantMailTemplate(accountManagerGroup, ureq.getIdentity());
      accountManagerGroupController.setRemoveUserMailTempl(ownerAremoveUserMailTempl);
      accountManagementFormVC.put("accountManagementController", accountManagerGroupController.getInitialComponent());
    }
   
    // Modules config   
View Full Code Here

    listTableData.setObjects(dateList);
    tableListParticipants.setTableDataModel(listTableData);
  }

  private void createAddedNotificationMail(UserRequest ureq, String subjectStr) {
    MailTemplate mailTempl = denManager.getAddedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
View Full Code Here

    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
    notificationCmc.activate();
  }

  private void createRemovedNotificationMail(UserRequest ureq, String subjectStr) {
    MailTemplate mailTempl = denManager.getRemovedMailTemplate(ureq, subjectStr, getTranslator());
    addedNotificationCtr = new MailNotificationEditController(getWindowControl(), ureq, mailTempl, false);
    addedNotificationCtr.addControllerListener(this);
    VelocityContainer sendNotificationVC = new VelocityContainer("sendnotification", VELOCITY_ROOT + "/sendnotification.html", getTranslator(), this);
    sendNotificationVC.put("notificationForm", addedNotificationCtr.getInitialComponent());
    notificationCmc = new CloseableModalController(getWindowControl(), "close", sendNotificationVC);
View Full Code Here

    if (redtm.getObjects(tmse.getSelection()).size() != 0) {
      selectedGroups = redtm.getObjects(tmse.getSelection());
      if (deleteGroupMailCtr != null) {
        deleteGroupMailCtr.dispose();
      }
      MailTemplate deleteMailTemplate = createMailTemplate(pT.translate(KEY_EMAIL_SUBJECT), pT.translate(KEY_EMAIL_BODY));
      deleteMailTemplate.addToContext("lastloginduration",   Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() ));
      deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() ));
      deleteGroupMailCtr = new MailNotificationEditController(getWindowControl(), ureq, deleteMailTemplate, true);
      deleteGroupMailCtr.addControllerListener(this);
      cmc = new CloseableModalController(getWindowControl(), pT.translate("close"), deleteGroupMailCtr.getInitialComponent());
      cmc.activate();
View Full Code Here

   * @param subject
   * @param body
   * @return
   */
  private MailTemplate createMailTemplate(String subject, String body) {   
    return new MailTemplate(subject, body, null) {
      @Override
      public void putVariablesInMailContext(VelocityContext context, Identity identity) {
        context.put("firstname", identity.getUser().getProperty(UserConstants.FIRSTNAME, null));
        context.put("lastname", identity.getUser().getProperty(UserConstants.LASTNAME, null));
        context.put("username", identity.getName());
View Full Code Here

TOP

Related Classes of org.olat.core.util.mail.MailTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.