Package org.projectforge.mail

Examples of org.projectforge.mail.Mail


    if (result.contains("*") == true) {
      log.fatal(ERROR_MSG);
      final String recipients = configuration.getStringValue(ConfigurationParam.SYSTEM_ADMIN_E_MAIL);
      if (StringUtils.isNotBlank(recipients) == true) {
        log.info("Try to inform administrator about re-indexing error.");
        final Mail msg = new Mail();
        msg.setTo(recipients);
        msg.setProjectForgeSubject("Error while re-indexing ProjectForge data-base.");
        msg.setContent(ERROR_MSG + "\n\nResult:\n" + result);
        msg.setContentType(Mail.CONTENTTYPE_TEXT);
        sendMail.send(msg, null, null);
      }
    }
    log.info("Re-index job finished successfully.");
  }
View Full Code Here


      if (++i >= 10) {
        break;
      }
    }
    data.put("history", list);
    final Mail msg = new Mail();
    msg.setTo(contactPerson);
    final String subject;
    if (operationType == OperationType.INSERT) {
      subject = "Auftrag #" + auftrag.getNummer() + " wurde angelegt.";
    } else if (operationType == OperationType.DELETE) {
      subject = "Auftrag #" + auftrag.getNummer() + " wurde gelöscht.";
    } else {
      subject = "Auftrag #" + auftrag.getNummer() + " wurde geändert.";
    }
    msg.setProjectForgeSubject(subject);
    data.put("subject", subject);
    final String content = sendMail.renderGroovyTemplate(msg, "mail/orderChangeNotification.html", data, contactPerson);
    msg.setContent(content);
    msg.setContentType(Mail.CONTENTTYPE_HTML);
    return sendMail.send(msg, null, null);
  }
View Full Code Here

    if (orgId != null) {
      final TeamEventDO orgEvent = teamEventDao.getById(orgId);
      marker.computeChanges(event, orgEvent);
    }
    final String content = getICal(event, type);
    final Mail msg = new Mail();
    msg.setProjectForgeSubject(composeSubject(event, type));
    msg.setContentType(Mail.CONTENTTYPE_HTML);
    final SendMail sendMail = new SendMail();
    sendMail.setConfigXml(ConfigXml.getInstance());
    for (final TeamEventAttendeeDO attendee : event.getAttendees()) {
      msg.setContent(composeHtmlContent(event, attendee.getNumber(), type, marker));
      if (attendee.getUserId() == null) {
        msg.setTo(attendee.getUrl());
      } else {
        msg.setTo(attendee.getUser());
        if (attendee.getUser().equals(PFUserContext.getUser()) == true) {
          continue;
        }
      }
      switch (type) {
View Full Code Here

          + ") of the notification has no select access to the todo entry: "
          + toDo);
      return;
    }
    final Locale locale = recipient.getLocale();
    final Mail msg = new Mail();
    msg.setTo(recipient);
    final StringBuffer subject = new StringBuffer();
    final ToDoStatus status = toDo.getStatus();
    if (status != null && status != ToDoStatus.OPENED) {
      subject.append("[").append(I18nHelper.getLocalizedString(locale, "plugins.todo.status")).append(": ")
      .append(I18nHelper.getLocalizedString(locale, status.getI18nKey())).append("] ");
    }
    subject.append(I18nHelper.getLocalizedString(locale, "plugins.todo.todo")).append(": ");
    subject.append(toDo.getSubject());
    msg.setProjectForgeSubject(subject.toString());
    final String content = sendMail.renderGroovyTemplate(msg, "mail/todoChangeNotification.html", data, recipient);
    msg.setContent(content);
    msg.setContentType(Mail.CONTENTTYPE_HTML);
    sendMail.send(msg, null, null);
  }
View Full Code Here

TOP

Related Classes of org.projectforge.mail.Mail

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.