<cfpop>
Retrieves and deletes e-mail messages from a POP mail server.
This tag cannot have a body.
This tag is also supported within <cfscript>
<cfpop
connection=string
server=string
uid=string
port=number
username=string
password=string
secure=boolean
action=getHeaderOnly|getAll|delete
name=string
messageNumber=string
attachmentPath=string
timeout=number
debug=boolean
maxRows=number
startRow=number
generateUniqueFilenames=boolean
delimiter=string
>
| Attribute | Description | Default |
|---|---|---|
connection
string, optional
|
edit
label for a connection. |
|
server
string, optional
|
edit
Host name biff.upperlip.com or IP address 192.1.2.225 of the POP server. |
|
uid
string, optional
|
edit
UID or a comma-delimited list of UIDs to get or delete. Invalid UIDs are ignored. |
|
port
number, optional
|
edit
Defaults to the standard POP port, 110. |
|
username
string, optional
|
edit
If no user name is specified, the POP connection is anonymous. |
|
password
string, optional
|
edit
Password that corresponds to user name. |
|
secure
boolean, optional
|
edit
enables SSL for pop requests |
|
action
string, optional
|
edit
Specifies the mail action.
|
getHeaderOnly |
name
string, optional
|
edit
Name for the index query. Alias: variable |
|
messageNumber
string, optional
|
edit
Can be a comma-separated list of the message ids |
|
attachmentPath
string, optional
|
edit
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
number, optional
|
edit
Specifies the maximum time, in seconds, to wait for mail processing. Defaults is 60 seconds. |
|
maxRows
number, optional
|
edit
Sets the number of messages returned, starting with the number in the startRow attribute. This attribute is ignored if messageNumber is specified. |
|
startRow
number, optional
|
edit
Specifies the first row number to be retrieved. Default is 1. This attribute is ignored if messageNumber is specified. |
|
generateUniqueFilenames
boolean, optional
|
edit
Boolean indicating whether to generate unique filenames for the files attached to an e-mail message to avoid naming conflicts when the files are saved. Default is NO. |
|
delimiter
string, optional
|
edit
Character that separates uid list, The default value is comma(,). Alias: delimiters |
Unimplemented Attribute(s)
| Attribute | Description | Default |
|---|---|---|
debug
boolean,
optional
|
edit
this attribute is deprecated and ignored, log control happens via the logging framework directly. * deprecated * |
Examples
editAction getAll
<cfpop action="getAll" username="#username#" password="#password#" server="#server_name#" uid="#uid#" name="res">
<cfdump var="#res#" />
<cfpop action="getAll" username="#username#" password="#password#" server="pop.mail.com" port="995" secure="true" name="message"
maxrows = "15" attachmentpath="#expandpath('./')#">
<cfdump var="#message#" />
Action getHeaderOnly
<cfpop action="getHeaderOnly" username="#username#" password="#password#" server="pop.mail.com" name="getHeader">
<cfdump var="#getHeader#" />
Action delete
<cfpop action="delete" username="#username#" password="#password#" server="pop.mail.com" uid="1RaJA7-1ioN2e27mu-00thu">
See also
- Internet Protocols
- <cfimap>
- <cfmail>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)