New Coldfusion 9 Feature: CFIMAP (Access Remote Emails Kept On Another Mail Server)

IMAP stands for Internet Message Access Protocol. It is a method of accessing electronic mail or bulletin board messages that are kept on a (possibly shared) mail server. In other words, it permits a "client" email program to access remote message stores as if they were local. For example, email stored on an IMAP server can be manipulated from a desktop computer at home, a workstation at the office, and a notebook computer while traveling, without the need to transfer messages or files back and forth between these computers.

[code:cf]

<!-—- Replace your username and password with valid IMAP email account name and password.–—>

<cfimap server = "imap.gmail.com"
username = "test@gmail.com"
action="open"
secure="yes"
password = "testpassword"
connection = "gmailconnection" />

<!—– Retrieve mails information from INBOX. –—>

<cfimap action="getAll"
connection= "gmailconnection"
name="result" />

<cfdump var="#result#">

<cfimap action="close"
connection = "gmailconnection">

[/code]