Deleting Files with CFThread
From what I understand, my file should be deleted whenever the mail is done being sent. However, the file is not being deleted. Am I missing something? I need to use threading because if I just try to send the file then delete it, the file is not found.
<cfthread action="run" name="send_mail">
<cfmail to="#to#" from="#from#" subject="Report">
<cfmailparam file="#filename#.pdf">
#variables.text#
</cfmail>
</cfthread>
<cfthread action="join" name="send_mail">
<cffile action="delete" file="#filename#.pdf">
</cfthread>
Thanks!
