I have a list of email ids.i want to filter inbox messages and display only emails from those users in thunderbird. Please help me doing this.

This is what i tried so far and it's not working.But im getting completely irrelevant error message "We are unable to print or preview this page".

```
var gLocalIncomingServer = MailServices.accounts.localFoldersServer;
var gLocalMsgAccount = MailServices.accounts.FindAccountForServer(
 gLocalIncomingServer);

var gLocalRootFolder = gLocalIncomingServer.rootMsgFolder
                  .QueryInterface(Ci.nsIMsgLocalMailFolder);

const kInboxFlag = Components.interfaces.nsMsgFolderFlags.Inbox; 
var gLocalInboxFolder = gLocalRootFolder.getFolderWithFlags(kInboxFlag); 
gLocalRootFolder.findSubFolder(gLocalInboxFolder.URI); 

gLocalInboxFolder.setFlag(Ci.nsMsgFolderFlags.Mail);

 // Force an initialization of the Inbox folder database.
 var folderName = gLocalInboxFolder.prettiestName;

 var aValue = "example@domain.com";
 var aAttrib = Ci.nsMsgSearchAttrib.Sender;
 var aop = nsMsgSearchOp.Contains;;
 var hitCount = 1;

var searchListener =
 {
  onSearchHit: function(dbHdr, folder) { hitCount++; },
  onSearchDone: function(status)
  {
    print("Finished search does " + aHitCount + " equal " + hitCount + "?");
    searchSession = null;
    do_check_eq(aHitCount, hitCount);
    if (onDone)
    onDone();
  },
 onNewSearch: function() {hitCount = 0;}
};

// define and initiate the search session

var hitCount;
var searchSession = Cc["@mozilla.org/messenger/searchSession;1"]
                    .createInstance(Ci.nsIMsgSearchSession);
searchSession.addScopeTerm(Ci.nsMsgSearchScope.offlineMail, gLocalInboxFolder);
var searchTerm = searchSession.createTerm();
searchTerm.attrib = aAttrib;

var value = searchTerm.value;
// This is tricky - value.attrib must be set before actual values
value.attrib = aAttrib;
value.str = aValue;
searchTerm.value = value;
if (aAttrib > nsMsgSearchAttrib.OtherHeader)
  searchTerm.arbitraryHeader = gArrayHdrs[aAttrib - 1 - nsMsgSearchAttrib.OtherHeader];
searchTerm.op = aOp;
searchTerm.booleanAnd = false;
searchSession.appendTerm(searchTerm);
searchSession.registerListener(searchListener);
searchSession.search(null);
alert("search is done:");

```