Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Searching two string at a time in the Object of emails
#1
Hello,
  with SearchMailBox is possible to search emails with some criteria.

I need to search emails that Object contains the string "ACC: " and emails that Object contains the string "CON: ".

Can i search both strings at a time?

This code
Code:
  SearchInfo.Date := 0;
  SearchInfo.Size := 0;
  SearchInfo.SearchKey := skUnseen;
  SearchInfo.Text := '';
  SearchInfoArray[0] := SearchInfo;

  SearchInfo.SearchKey := skSubject;
  SearchInfo.Text := 'ACC: ';
  SearchInfoArray[1] := SearchInfo;

  SearchInfo.SearchKey := skSubject;
  SearchInfo.Text := 'CON: ';
  SearchInfoArray[2] := SearchInfo;

  if IMAP.SearchMailBox(SearchInfoArray) then
is right?

It seems not right because I dont find the emails.
if i search only one string at a time i found the emails.

Where I'm wrong?

Thanks
Reply


Messages In This Thread
Searching two string at a time in the Object of emails - by luigisic - 01-07-2022, 06:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)