Hello everyone,
I have a situation, I would like to read a lookup and for each field that match with a search criteria, send a email.
For example: I have the lookup mails.csv and if I find something like this
send | |
test1@gmail.com | NO |
test2@gmail.com | NO |
So I would like to send a email for each field in the column send with the word "NO" and after that change the state to "Yes".
I have this search,
| inputlookup append=t mails.csv
| search send = NO
| eval email_subj= subject
| eval body = email_subj
| eval email_to ="desk@xxx.xx"
| table email_subj, email_to, body
| sendresults --- >>>>At this point, just send the first result that found
[search lookup cm.csv | fields subject| rename subject As email_subj
| eval send= "YES"
| eval asunto=email_subj
| table asunto, sender , send]
| outputlookup cm.csv --- >>>> Change the value in any field with the word NO and delete the others
Thanks in advance.