Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2013
    Rep Power

    Default Can someone please please help !!!

    I am working on a code to search my email by subject and download attachment. Below is the code which I tried in 2 ways
    but found returns 0. Can some one please help. Also I need to search if email has attachment as .xls.
    I am using gmail pop3

    SearchTerm st = new SearchTerm()//XT_
    public boolean match(Message message) {
    return true;
    }catch(MessagingException ex) {
    return false;


    Message[] found =;//returns 0

    2) SubjectTerm bodyTerm = new SubjectTerm("XTIME_");

    System.out.println("Searching for BodyTerm with keyword = "+ "XTIME_ ");

    Message[] found =; // found returms 0
    Reply With Quote

  2. #2
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Rep Power

    Default Re: Can someone please please help !!!

    Try putting some print line statements in your code to see what various variables are at certain points within the program as a means of debugging your code.
    That may give you a better idea as to why you are not getting the output you expect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts