Write dump in cfmail with cfscript in ColdFusion
This weekend I was working on a small ColdFusion project and am using cf9. All my cfc's are in script and I wanted to dump full scopes and email them back to myself. Its not as simple as in tags but its a workable solution using savecontent.
I really expected this to just work:
mail.addPart( type="html", charset="utf-8", body=writedump(application) );
But it wont so here is the solution:
Here is the solution:
The other exception to my project was one cfc had to have a udf for cfexecute which also is not yet in cfscript.
To answer Steves question here is the code example.
You can just attach the report as a file attachment and specify the content.