I am using Ruby 2.5.3 & the mail gem (2.7.1). I am structuring the IMAP search command to retrieve emails given a list of email addresses and various since dates. It is a logical OR of the search email addresses.
I am using this email_filter:
(OR (FROM a1@b.com SINCE 1-Oct-2018) (OR (FROM a2@b.com SINCE 10-Oct-2018) (OR (FROM a3@b.com SINCE 19-Oct-2018))))
which seems to be consistent with the RFC 3501 ABNR form.
The ruby code: to structure the search:
search_options = { count: no_emails_to_process, what: :first, order: :asc, keys: email_filter}
Mail.find(search_options) do |mail, imap, uid, attrs|
etc ...
It raised an error:
Error in IMAP command UID SEARCH: Missing argument
I assume the syntax isn't right because limiting the search to just one email address works fine.
I need some help.