01-07-2022, 06:22 PM
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
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
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
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