Can you check over this for me?!
<!--- loop through all the marked mails --->
<cfloop index="delloop" from="1" to="#listlen(mlist)#">
<cfquery name="checkothers" datasource="#application.maildsn#">
select filename from mail where messageid=#listgetat(mlist,delloop)#
</cfquery>
<!--- we can delete this message if the recordcount is 1 --->
<cfif checkothers.recordcount is 1>
<!--- check to see if the file exists. --->
<cfset fname=checkothers.filename>
<cfif findnocase(configuredmaildirectory,fname,1) gt 0><cfset
fname=right(fname,len(fname)-len(configuredmaildirectory))></cfif>
<cfdirectory action="list" directory="#configuredmaildirectory#"
name="isfilethere" filter="#fname#">
<cfif isfilethere.recordcount gt 0>
<cftry>
<cffile action="delete" file="#checkothers.filename#">
<cfcatch></cfcatch></cftry>
</cfif>
</cfif>
</cfloop>
<!--- now delete the messages from this user's folder --->
<cfquery datasource="#application.maildsn#">
delete from mail where accountnum=#session.accountnum# and messageid in
(#mlist#)
</cfquery>
-----Original Message-----
From: Howie Hamlin [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 9:48 AM
To: inFusion Support List
Subject: Re: [iMS] Multiple recipents on the same internal domain.
It looks like it should...
Howie
----- Original Message -----
From: "Greg Silver" <[EMAIL PROTECTED]>
To: "inFusion Support List" <[EMAIL PROTECTED]>
Sent: Friday, December 14, 2001 9:39 AM
Subject: RE: [iMS] Multiple recipents on the same internal domain.
> well wouldnt this work?
>
> <!--- first we get a list of the files to delete --->
>
> <cfquery name="emailfiles" datasource="#application.maildsn#">
> select filename from mail where messageid in (#PopDelete#)
> </cfquery>
>
> <!--- delete all of the files --->
>
> <cfoutput query="emailfiles">
>
> <cfquery name="checkothers" datasource="#application.maildsn#">
> select messageid from mail where filename='#filename#'
> </cfquery>
>
> <cfif checkothers.recordcount is 1>
> <cfif fileexists(filename)>
> <CFTRY>
> <cffile action="delete" file="#filename#">
> <CFCATCH>
> </CFCATCH>
> </CFTRY>
> </cfif>
> </cfif>
>
> </cfoutput>
>
==^=======================================================
This list server is Powered by iMS
"The Swiss Army Knife of Mail Servers"
--------------------------------------
To leave this list please complete the form at
http://www.coolfusion.com/iMSSupport.cfm
Need an iMS Developer license? Sign up for a free license here:
http://www.coolfusion.com/iMSDevelopers.cfm
List archives: http://www.mail-archive.com/infusion-email%40eoscape.com/
Note: You are subscribed as [email protected]
==^=======================================================