Package javax.mail.search

Examples of javax.mail.search.SubjectTerm


   * @return Il messaggio completo.
   * @throws ApsSystemException In caso di errore.
   */
  protected Message searchCompleteMessage(Message smallMessage) throws ApsSystemException {
    try {
      SubjectTerm term = new SubjectTerm(smallMessage.getSubject());
      Folder folder = this.getCurrentFolder();
      folder.open(Folder.READ_WRITE);
      this.setOpenedFolder(folder);
      Message[] messages = folder.search(term);
      if (null != messages) {
View Full Code Here


            String searchString = (String) ctx.get("param:" + "search");
            if (searchString == null) {
                searchString = "";
            }
            searchTerm = new OrTerm(
                    new SubjectTerm(searchString),
                    new FromStringTerm(searchString));

            // build searchTerm from searchTermString

            /* proposed searchTermString syntax
View Full Code Here

            new AndTerm(
                new FromStringTerm("from"),
                new RecipientStringTerm(Message.RecipientType.TO, "to")
            ),
            new NotTerm(
                new SubjectTerm("subject")
            )
          ),
          new FromStringTerm("from2")
        );
View Full Code Here

            new AndTerm(
                new FromStringTerm("from"),
                new RecipientStringTerm(Message.RecipientType.TO, "to")
            ),
            new NotTerm(
                new SubjectTerm("subject")
            ),
            new FromStringTerm("from2")
          }
        );
View Full Code Here

  /**
   * Defines filter for SUBJECT field.
   */
  public EmailFilter subject(String subject) {
    SearchTerm subjectTerm = new SubjectTerm(subject);
    concat(subjectTerm);
    return this;
  }
View Full Code Here

TOP

Related Classes of javax.mail.search.SubjectTerm

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.