POP and IMAP mail protocol and
implementation with ColdFusion
POP – Post Office Protocol.
IMAP – Internet Message Access Protocol
POP implementation with Coldfusion.
IMAP implementation with Coldfusion.
POP – Post Office Protocol
The Post Office Protocol (POP) is an application-layer Internet standard protocol
used by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP
POP allows the user to download messages one at a time and only deletes them
from the server after they have been successfully saved on local storage.
It is possible to leave messages on the server to permit another user to access
There is no provision for flagging a specific message as seen, answered,
Thus POP is not convenient for users who access the same mail from different
machines or users.
The POP protocol has been developed through several versions, with version 3
(POP3) being the current standard.
Advantages & Disadvantages of
◦ Once all emails downloaded, you can view your email anytime you want on your
personal computer, even if you are NOT connected to the Internet.
◦ Emails are stored on your hard drive so they're not subject to server storage limits.
◦ POP is widely supported by Internet Service Providers(ISPs) and email providers.
◦ Emails are stored on your hard drive so they're not accessible from other computers.
◦ Once email is downloaded, it will not be available at other computers unless you
configure your email client to leave mail on the server. If email is left on the server, it
is more difficult to tell which emails you have read/not read when accessing from
another computer. You also will not be able to organize your email on the server.
◦ Since email is stored directly on your hard drive, if you have a hard drive failure your
messages will be lost.
◦ It is also more difficult to change email clients. (such as Eudora or Outlook) since
you will need to import/export mail into the new email client.
Internet Message Access
IMAP (Internet Message Access Protocol) is a standard protocol for
accessing e-mail from a remote server.
In IMAP, You can also create and manipulate multiple folders or mailboxes on
the server, delete messages, or search for certain parts. or an entire note.
IMAP is designed for the situation where you need to work with your email
from multiple computers, such as your workstation at work, your desktop
computer at home, or a laptop computer while traveling.
There is provision for flagging a specific message as seen, answered,
The current version, IMAP version 4 revision 1 (IMAP4rev1).
Advantages & Disadvantages of
◦ Messages are stored on the server are accessible from any computer and webmail
anywhere in the world.
◦ All email is stored and accessed directly from the server. If you happen to have a
hard drive crash or change email clients, your email will still be accessible when
using another computer.
◦ Since email stored on server it is easy to change email clients.
◦ Sent emails and drafts are also stored on the server.
◦ IMAP requires continual access to the server during the time that you are working
with your mail.
◦ Very few ISPs and email providers offer IMAP as it is considered a high end option
and it's complex for them to support.
Column name getHeaderOnly returns getAll returns
Date yes yes
From yes yes
Messagenumber yes yes
Messageid yes yes
Replyto yes yes
Subject yes yes
Cc yes yes
To yes yes
Body no yes
textBody no yes
HTMLBody no yes
Header yes yes
Attachments no yes
Attachmentfiles no yes
UID yes yes
Cids no yes
<cfimap action = “delete | deletefolder | createfolder | open | close | renamefolder |
listallfolders | markread | movemail | getall | getheaderonly"
attachmentpath = "string"
connection = "string"
folder = "string"
generateuniquefilenames = "yes|no"
maxrows = "integer"
name = "string"
newfolder = "string"
password = "string"
port = "integer"
recurse = "true|false"
secure = "yes|no"
server = "IMAP server address"
startrow = "integer"
stoponerror = "true|false"
uid = "integer or comma-delimited list of integers"
username = “username">