<CFPOP SERVER="servername"
    PORT="port_number"
    USERNAME="username"
    PASSWORD="password"
    ACTION="action"
    NAME="queryname"
    MESSAGENUMBER="number"
    ATTACHMENTPATH="path"
    TIMEOUT="seconds"
    MAXROWS="number"
    STARTROW="number"
    GENERATEUNIQUEFILENAMES="boolean">

CFPOP retrieves and deletes email messages from a POP mail server. See also CFMAIL.

SERVER

Required. Host name (biff.upperlip.com) or IP address (192.1.2.225) of the POP server.

PORT

Optional. Defaults to the standard POP port, 110.

USERNAME

Optional. If no user name is specified, the POP connection is anonymous.

PASSWORD

Optional. Password corresponds to user name.

ACTION

Optional. Specifies the mail action. There are three possible values:

NAME

Optional. The name you assign to the index query. Required for ACTION="GetHeaderOnly" and ACTION="GetAll".

MESSAGENUMBER

Optional. Specifies the message number(s) for the given action. MESSAGENUMBER is required for ACTION="Delete". If it is provided for ACTION="GetHeaderOnly" or ACTION="GetAll", only referenced messages will be retrieved. If it is omitted for ACTION="GetHeaderOnly"or ACTION="GetAll", all messages available on the server are returned.

MESSAGENUMBER can contain individual message numbers or a comma- separated list of message numbers. Invalid message numbers will be ignored.

ATTACHMENTPATH

Optional. Allows attachments to be written to the specified directory when ACTION="GetAll". If an invalid ATTACHMENTPATH is specified, no attachment files are written to the server.

TIMEOUT

Optional. Specifies the maximum amount of time in seconds to wait for mail processing. Defaults to 60 seconds.

MAXROWS

Optional. Specifies the maximum number of entries for mail queries. This attribute is ignored if MESSAGENUMBER is specified.

STARTROW

Optional. Specifies the first row number to be retrieved. Default is 1. This attribute is ignored if MESSAGENUMBER is specified.

GENERATEUNIQUFILENAMES

Optional. Boolean indicating whether to generate unique file names for the files attached to an email message in order to avoid naming conflicts when the files are saved. The default is NO.

See CFML Language Reference for details on CFPOP Query Variables.