Did you know ... Search Documentation:
Pack mail_standards -- prolog/maildir/conditions.pl
PublicShow source

Use this library for some useful conditions to use on search_mails/4.

author
- Gimenez, Christian
license
- GPLv3
 is_seen(+Filepath:term)
True iff this mail is seen.
 is_unseen(+Mailfile:term)
True iff the Mailfile is not marked as seen or is in the new directory.
 to_substr(+Substr:codes, +Mailfile:term)
True iff the message/2 compound term has the header "To" in which its value has Substr as substring.
Arguments:
Mailfile- Mail file path. Relative and absolute path are supported.
 from_substr(+Substr:codes, +Mailfile:term)
True iff the message/2 compound term has the header "To" in which its value has Substr as substring.
Arguments:
Mailfile- Mail file path. Relative and absolute path are supported.
 subject_substr(+Substr:codes, +Mailfile:term)
True iff the message/2 compound term has the header "Subject" in which its value has Substr as substring.
Arguments:
Mailfile- Mail file path. Relative and absolute path are supported.
 older_than(+Date:pred, +Mailfile:term) is det
True iff the mail has the "Date" header with value older than the date specified.

Remember to set the timezone accordingly.

Consider the following example, which it checks if the mails is older than 9 of december of 2015 at 17:27:50 hours in -0300 UTC (10800 = -3 hours * 60 mins * 60 seconds).

older_than(date(2015, 12, 9, 17, 27, 50, 10800, -, -), './mailfile').
Arguments:
Date- a date/9 predicate as explained in the date package (see date_time_stamp/2).
Mailfile- Mail file path. Relative and absolute path are supported.