简体   繁体   中英

C# Mailkit Search and if condition

i dont know if this is easy or not but i am trying to validate a search query in mailkit and some jobs like

var query = SearchQuery.BodyContains("searchforsoemthink1").Or(SearchQuery.BodyContains("searchforsomethink2"));
foreach (var uid in sent.Search(query))
{
...check if condition 1 is true SearchQuery.BodyContains("searchforsoemthink1") and some jobs
...check if condition 2 is true SearchQuery.BodyContains("searchforsomethink2") and do some jobs}

The only way to do this would be to run multiple search queries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM