Deleting Mail with <CFPOP>

Using the techniques described in this chapter, I can design a complete email client using nothing but ColdFusion. I'd use <CFPOP> in my template pages to get and display users'messages, and <CFMAIL> to send outgoing mail. But so far I've only covered reading and sending mail—what if I want to remove it from the server after the user has read it?

I'd use the third <CFPOP> action, DELETE. This action always works in conjunction with the parameter MESSAGENUMBER to define a specific message to be deleted.

Caution

When you use <CFPOP>'s DELETE parameter to remove a message from a mail server, the message is pretty much unrecoverable. If the mail server's sysadmin takes a liking to you, he might opt to restore the message ...

Get Sams Teach Yourself ColdFusion® in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.