The IMAP Plugin enables interacting with IMAP servers from ACTHEX. It partially implements the client-side of the Internet Message Access Protocol (IMAP) to allow the integration of email messages into ACTHEX programs. It is compatible with the Hexlite solver for HEX programs.
#login
establishes a connection to an IMAP server.
Example:
The execution of the following action causes to login with connection ID connectionID at server example.com:143 with username ”user1@example.com” and password ”password123” without SSL encryption:#login[connection1, ”example.com”, 143, ”user1@example.com”, ”password123”, 0].
&logged_in
evaluates to true iff there already exists a connection with the given ConnectionID.
Example:
The evaluation of the following rules results in login_successful being true or false depending if there is a connection with connection ID connection1:login_successful :- &logged_in[connection1]. −login_successful :- not &logged_in[connection1].
&mailbox
returns the mailboxes in the in a specified path with a specified name.
Example:
The following rule creates a mailbox-atom for each mailbox at the email account identified by connection1 in path "INBOX" that has "Junk" in its name (e.g. "INBOX/Junk-Mail"):mailbox(M) :- &mailbox[connection1, ”INBOX”, ”Junk*”](M).
&filter
returns the message IDs of specified messages.
Example:
The following rule creates a message_id-atom for each message in "INBOX" that is from user2.example.com or has a "Deleted" flag:message_id(ID) :- &filter[connection1, ”INBOX”, ”or from ′user2.example.com′ deleted”](ID).
&msg_header
returns message headers of a specified message.
Example:
The following rule creates a header-atom for each message header of the message with ID 3 in "INBOX":header(T, V) :- &msg_header[connection1, ”INBOX”, 3](T, V).
&msg_body
returns the body of a specified message.
Example:
The following rule creates a body-atom for the message with ID 3 in "INBOX":body(B) :- &msg_body[connection1, ”INBOX”, 3](B).
#set_flag
sets a flag for a message.
Example:
The execution of the following action causes the message with ID 3 in "INBOX" to be marked with a "Deleted"-flag:#set_flag[connection1, ”INBOX”, 3, ”Deleted”].
#copy_msg
copies a message to another mailbox.
Example:
The execution of the following action causes the message with ID 3 in "INBOX" to be copied to ”INBOX/Junk E−Mail”:#copy_msg[connection1, ”INBOX”, 3, ”INBOX/Junk E−Mail”].
#create_msg
creates a specified message.
Example:
The execution of the following action causes the creation of the draft of a new message from ”user1@example.com” with subject ”subject1” to ”user2@example.com” and ”user3@example.com” with text "text123" in "INBOX":#create_msg[connection1, INBOX, ”user1@example.com”, ”subject1”, ”recipient(”user2@example.com”, ”user3@example.com”), cc(), bcc(), ”text123”].
#move_msg
movies a message to another mailbox.
Example:
The execution of the following action causes the message with ID 3 to be moved from "INBOX" to "INBOX/Junk E-Mail":#move_msg[connection1, ”INBOX”, 3, ”INBOX/Junk E−Mail”].
#expunge_msgs
expunges all messages in the specified mailbox with a \Deleted flag.
Example:
The execution of the following action causes all messages in "INBOX" that have a "Deleted" flag to be expunged:#expunge_msgs[connection1, ”INBOX”].
#create_mailbox
creates a new mailbox.
Example:
The execution of the following action causes the creation of a new mailbox with name "INBOX/Mailbox2".#create_mailbox[connection1, ”INBOX/Mailbox2”].
#delete_mailbox
deletes a mailbox.
Example:
The execution of the following action causes mailbox "INBOX" to be deleted:#delete_mailbox[connection1, ”INBOX”].
#rename_mailbox
renames a mailbox.
Example:
The execution of the following action causes mailbox "Mailbox1" to be renamed to "Mailbox2":#rename_mailbox[connection1, ”Mailbox1”, ”Mailbox2”].
#reply
creates the draft of a reply message for a specified message.
Example:
The execution of the following action causes the creation of a draft in "INBOX" with text "text123". The new message has the recipient of the message with ID 3 as its sender, the sender of the message of ID 3 as its recipients and the subject of the message with ID 3 with a prefixed "Re: ":#reply[connection1, ”INBOX”, 3, ”text123”].
General
dlvhex source code @ github.com
Description-Of-A-Project
Popular Plugins
Action Plugin
DecisionDiagrams Plugin
Description Logics Plugin
Description Logics Lite Plugin
MELD: Belief Merging Plugin
Nested HEX Plugin
MCSIE Plugin
String Plugin
dlvhex-semweb Project
IMAP Acthex Plugin
Documentation
User Guide
README
doxygen
Writing Plugins in C++
Writing Plugins in Python