Installation guide
1.  Open a connection to the mail server (OPEN action). 
2.  Get a list of folders from the mail server (
LISTALLFOLDERS action). 
3.  Get a list of messages within a specific folder (
LISTMAIL action). 
4.  Perform actions with specific messages (READMAIL,  MARKREAD, DELTEMAIL, and 
MOVEMAIL actions). 
5.  Perform actions with folders (
DELETEFOLDER and RENAMEFOLDER actions). 
6.  Close the connection (
CLOSE action). 
Each of these steps is described below. 
4.5.7.1 Opening a Connection 
Before performing actions such as reading mail, you must first open a connection with 
the IMAP or POP server. Specify a value of 
OPEN for the action attribute. The name 
specified for the 
connection attribute will be used to refer to this connection when per-
forming subsequent actions with the IMAP or POP server, such as reading mail. 
<CFIMAP ACTION="OPEN" 
 SERVICE="POP3 or IMAP" 
 CONNECTION="name" 
 SERVER="mail.yourdomain.com" 
 USERNAME="username" 
 PASSWORD="password"> 
Two variables are always returned by the CFIMAP tag: 
IMAP.SUCCEEDED – “true” or “false” depending on whether the previous action 
succeeded 
IMAP.ERRORTEXT – an error message, if the previous action failed 
4.5.7.2 Closing a Connection 
An IMAP or POP server connection can be closed by specifying ACTION=”CLOSE” and 
the name of the connection: 
<CFIMAP ACTION="CLOSE" 
 CONNECTION="name"> 
After closing a connection, any attempts to use the connection will generate an error. 
4.5.7.3 Listing Mailbox Folders 
Use ACTION=”LISTALLFOLDERS” to get a list of folders on the IMAP or POP server: 
<CFIMAP ACTION="LISTALLFOLDERS" 
 CONNECTION="name" 
NAME="queryname"> 
BlueDragon 6.1 CFML Compatibility and Reference Guide    28   










