ColdFusion 9 now has the ability to directly interface with IMAP servers, including Google's GMail and Google Apps. Like most ColdFusion tags, the syntax is very simple. Here is an example:
ColdFISH is developed by Jason Delmore. Source code and license information available at coldfish.riaforge.org
<cfimap
action="open"
server = "imap.gmail.com"
username = "yourusername"
password = "yourpassword"
secure="yes"
connection = "mail.gmail"
>
<!--- Get the Headers. --->
<cfimap
action="getHeaderOnly"
connection="mail.gmail"
name="theHeaders">
<cfdump var="#theHeaders#">
<cfimap
action="close"
connection = "mail.gmail">
1<cfimap
2action="open"
3server = "imap.gmail.com"
4username = "yourusername"
5password = "yourpassword"
6secure="yes"
7connection = "mail.gmail"
8>
9
10<!--- Get the Headers. --->
11<cfimap
12action="getHeaderOnly"
13connection="mail.gmail"
14name="theHeaders">
15
16<cfdump var="#theHeaders#">
17
18<cfimap
19action="close"
20connection = "mail.gmail">
The available actions are: GetHeaderOnly, GetAll, Delete, Open, Close, MarkRead, DeleteFolder, CreateFolder, RenameFolder, ListAllFolders, MoveMail.
Comments