Using the cfpop
tag to delete a message permanently removes it from the server. By default, retrieved messages remain on the POP mail server. To delete the messages, set the action
attribute of the cfpop
tag to Delete. Specify use the messagenumber
attribute to specify the messages to delete; omit the attribute to delete all the user's messages from the server.
Note: Message numbers are reassigned at the end of every POP mail server communication that contains a delete action. For example, if you retrieve four messages from a POP mail server, the server returns the message numbers 1,2,3,4. If you delete messages 1 and 2 with a single cfpop
tag, messages 3 and 4 are assigned message numbers 1 and 2, respectively.
<html> <head> <title>POP Mail Message Delete Example</title> </head> <body> <h2>This example deletes messages:</h2> <cfpop server="mail.company.com" username=#username# password=#password# action="Delete" messagenumber="1,2,3"> </body> </html>
<cfpop server="mail.company.com" username=#username# password=#password#
Caution: When you view this page in your web browser, ColdFusion immediately deletes the messages from the POP server.