tracker issue : CF-3667881

select a category, or use search below
(searches all categories and all time range)
Title:

It would be nice if a CFMail inside a Transaction wouldn't send until the transaction is complete

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Adam Tuttle / Adam Tuttle (Adam Tuttle)

Created: 11/14/2013

Components: Database

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 3

transaction{
mailService.sendMail(...);
logService.logSomething(...);
}

If the logService throws an exception, the email has already been sent. It would be a really nice language feature if the transaction had to be complete before the email would send, and it would not send the message if an exception occurred or the transaction was manually rolled back.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3667881

External Customer Info:
External Company:  
External Customer Name: Adam Tuttle
External Customer Email:  
External Test Config: n/a

Attachments:

Comments:

Indeed would be very handy.
Vote by External U.
13991 | November 14, 2013 12:55:17 PM GMT
Will certainly be helpful
Vote by External U.
13992 | November 15, 2013 12:26:23 AM GMT
This is a NEGATIVE vote. I think the use case here is too focused on Adam's specific need. The notion of being able to defer execution is a good one, but specifically tying this to <cfmail> is a bad idea. If there was a feature request to be able to generally defer execution of arbitrary code, I'd be all for it. I'd also be all for "success" handlers on a <cftransaction> (which would solve this sort of issue). But I'm not behind the feature request as described here at all. -- Adam
Vote by External U.
13993 | November 18, 2013 03:14:31 AM GMT