Strawberry Prolog supports e-mail predicates.
For UNIX use the predicate:
s_mail(To, Name, Email, Subject, Mail) which sends Mail to recipient To , from Name with Email . (ONLY for UNIX)
To use e-mail predicates with MS Windows you need to install your Windows Messaging System (Inbox ). You have to configure your own profile in it. The name of this profile will be used to log in the messaging system by the predicate logon(Profile, Password) . The variable Profile has to be instantiated with a string which contains the name of your profile that you configured in the Inbox. If your profile is configured with password then the variable Password should contain it (as a string). If you do not set up a password then the variable Password can be the empty string ( "" ). When the predicate logon will be executed then you will be asked for the password of your e-mail account (this will not happen if you set your e-mail account password in the Inbox).
How to install Microsoft Exchange.
To log out from the messaging system use the predicate logoff .
To send e-mail use send_mail(Address, Subject, Mail) . Here all three variables have to be instantiated with strings. The Address has to contain the e-mail address of the recipient or a name from the address book. The Subject has to contain the subject of your e-mail. The Mail have to contain the text of your e-mail.
To read new e-mail use read_new_mail(From, Subject, Mail) . Here all three variables have to be not-instantiated and they will be instantiated with strings. The From will contain the e-mail address of the sender of the e-mail. The Subject will contain the subject of the e-mail. The Mail will contain the text of the e-mail. After execution of this predicate the message will be marked as read. If there are not any new messages the predicate will fail.
Examples:
E-mail