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

Maildir implementation for reading e-mails under the Maildir format.

author
- Christian Gimenez
See also
- http://cr.yp.to/proto/maildir.html
license
- GPLv3
 get_flags(+Filename:term, ?Basename:term, ?Flags:lst)
True if Filename correspond to the Basename and the Flags appened according to the Maildir specs.
Arguments:
Flags- A list of "meaning" terms, see flags2/2. It is ordered as Maildir specs suggest.
 set_flags(+Basename:term, +Flags:list, ?Filename:term)
True iff Filename is the result of adding the given Flags to the Basename file.
 add_flags(+Filename:term, +NewFlags:list, -NewFilename:term)
True iff NewFilename is the same Filename with the NewFlags added if it doesn't have those.

If Filename has no Flags (i.e. is in new directory ) it will add the ':2,' format.

 list_mails(+Dir:term, +Type:term, -LstMails:lst)
True if all LstMails are a list of mails in the directory Dir for the maildir_type Type (see maildir_type/1).
 in_maildir_type(+Filepath:term, ?Maildir_Type:term)
True if the mail file given byy Filepath is in the Maildir_Type.
 search_mail(+Mailbox:term, +MailboxType:term, +Condition:pred, -LstMails:list)
Search for all mails inside the given Mailbox where Condition is true.

Condition must be a predicate with 1 arguments: Mailpath.

  • Mailpath is the mail file path relative to the Mailbox (cur/new/tmp is prefixed). It may have another argument that should be given. Example:
    search_mail('~/Maildir/', cur, to_substr("someone"), L).

    Will search all mails on `~/Maildir/cur` whose "To" field have "someone" as substring.