The mail spooler for ColdFusion MX 6.x/7 locks the mail spool directory when writing mail to disk. If a mail thread is trying to write a mail file to disk and is waiting to obtain the lock, it will wait up to 30 seconds and then throw a coldfusion.mail.MailSpooler$SpoolLockTimeoutException or coldfusion.mail.MailSessionException. I'm still exploring what might require the lock for so long and prevent other mail from being spooled to disk, but so far it seems well correlated with having message bodies of 12-15 MB in one case. The 30 second wait for the lock is hard coded and immutable, but writing a large message to disk shouldn't take 30 seconds in most situations. I'll update this later if I find more.

StackTrace coldfusion.mail.MailSessionException: An exception occurred when setting up mail server parameters
at coldfusion.mail.MailSpooler.storeMail(MailSpooler.java:670)
at coldfusion.tagext.net.MailTag.doAfterBody(MailTag.java:618)


"Error","scheduler-1","06/08/05","09:03:24",,"A problem occurred when attempting to deliver mail. This exception was caused by: coldfusion.mail.MailSpooler$SpoolLockTimeoutException: A timeout occurred while waiting for the lock on the mail spool directory.."