Jan 4, 2012
onError cfmail errors to yourself in ColdFusion in cfscript
I'm sure lots of people do the same thing as I do. In onError I eMail myself the errors ( and some other scopes ) so when errors occur on my application I can address them. Moving to script means I can have my entire Application.cfc in script how ever this introduced a small issue. Basically what I do is into the body of an email. With script it's a little more involved but still works eg:
You'll notice that I added output = true to the method annotation. I don't think that should be needed infact it works as expected in Railo. It's strange and not consistent with the tag implementation. I think its a bug in ACF. Before adding the annotation I was receiving my emails as expected but the body was always empty.
Update
Upon further investigation the code quoted above does not actually work. I think the actually issue is in mail.addPart();
However this code works just fine:
Subscribe to:
Post Comments (Atom)
2 comments: