Ejemplo n.º 1
0
  public void sendAsWatchListEmail(String sender, List<String> emailsForReplies) throws Exception {
    String htmlMessage = doTemplateMerge(this, "emails/post.html.vm");
    String textMessage = doTemplateMerge(this, "emails/post.txt.vm");

    String shortname = Helpers.getEnShortName() + "-watchlist";
    String fullSubject = "Re: [" + shortname + "] " + parent.getSubject();

    EmailModel.sendEmail(
        sender, emailsForReplies, fullSubject, textMessage, htmlMessage, shortname, false);
  }
Ejemplo n.º 2
0
  public void sendAsEmail(String sender, List<String> excludedEmails) throws Exception {
    String htmlMessage = doTemplateMerge(this, "emails/post.html.vm");
    String textMessage = doTemplateMerge(this, "emails/post.txt.vm");

    String shortname = getGroup().getTotalShortname();
    String fullSubject;

    if (parent == null) {
      this.setEmailed(true);
      fullSubject = "[" + shortname + "] " + subject;
    } else {
      fullSubject = "Re: [" + shortname + "] " + parent.getSubject();
    }

    List<String> groupMemberEmails = getGroup().getMemberEmails();
    if (excludedEmails != null) {
      groupMemberEmails.removeAll(excludedEmails);
    }

    if (!groupMemberEmails.isEmpty()) {
      EmailModel.sendEmail(
          sender, groupMemberEmails, fullSubject, textMessage, htmlMessage, shortname, true);
    }
  }