Name
imap4_login, imap4_command, imap4_logout — stateful IMAP4 client API
Synopsis
varchar imap4_login(
|
in host varchar, |
| in user varchar, | |
| in password varchar, | |
in options any); |
varchar imap4_command(
|
in session varchar, |
in command varchar); |
varchar imap4_logout(
|
in session varchar); |
Description
These three BIFs implement a stateful IMAP4 client. Use them to drive an
IMAP server from inside SQL when the higher-level
imap_get one-shot interface is not sufficient (for
example when issuing a sequence of commands within the same session).
imap4_login opens an IMAP connection to
host and authenticates as
user with password. The
optional options vector accepts keyword settings
such as port number and SSL/TLS use. Returns an opaque session identifier
(varchar) that must be passed to subsequent calls.
imap4_command sends a raw IMAP4 command (e.g.
'SELECT INBOX', 'FETCH 1 BODY[]') to
session and returns the server's full response as a
string.
imap4_logout issues the LOGOUT
command and closes session.