I have a web-based form that requires the user to upload a document. Everything 
works fine until I try and delete the document after delivery. With the delete 
action enabled the email does not get delivered. I have place the action=delete 
inside and outside of the </cfmail>

<cfif isDefined("form.attached") AND form.attached NEQ "">
<cffile action="upload" destination="f:\inetpub\wwwroot\......\......\upload" 
mode="644" nameConflict="overwrite" fileField="form.attached">
<cfset attachment="f:\inetpub\wwwroot\......\......\upload\#cffile.serverFile#">
</cfif>
<cfprocessingdirective suppresswhitespace="no">
                <cfmail from="#......#" to="#......#" subject="" type="html">
                                <cfsilent><cfif FORM.attached neq 
""><cfmailparam file="#attachment#" /></cfif></cfsilent>
</cfmail>

<cfif isDefined("form.attached") AND form.attached NEQ "">
                <cffile action="Delete" file="#attachment#">
                </cfif>

Steve LaBadie, Web Manager
East Stroudsburg University
570-422-3999
[email protected]<mailto:[email protected]>

[facebook-16x16]<http://www.facebook.com/eaststroudsburguniversity>  
[twitter-16x16] <http://twitter.com/esuniversity>   [youtube-16x16] 
<http://www.youtube.com/user/esuedu>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356963
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to