Quickly empty ColdFusion's undelivered mail queue

Published: {ts '2013-12-10 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/quickly-empty-coldfusions-undelivered-mail-queue/

Quick-tip: If you ever want to clear the list of undelivered mail in the ColdFusion admin you will quickly become frustrated by the fact that you can only delete 10 at a time. Fortunately there is an easy way to delete everything in one go (provided you have access to the server file system).

Delete mail from the file system

ColdFusion stores all its undelivered and spooled email as files. So open up the file system and navigate to the coldfusion install directory and locate the following folder.

{coldfusion install directory}\cfusion\Mail\Undelivr

Inside this folder are all the files relating to undelivered emails. Simply delete them all and you are done.

Alternative Method: Use SpoolMail

An alternative method to use if you don't have access to the servers file system is to use spoolmail.

This handy plugin allows to you quickly respool email or delete them from the queue much faster than using the normal admin controls. This also comes in very handy for development testing.