> I simply use this:
> 
> <cfdirectory directory="undelivr" action="list" name="undelivr">
> 
> <cfoutput query="undelivr"><cffile action="move" 
> destination="spool\#undelivr.name#" source="undelivr\#undelivr.name#"> 
> </cfoutput>
> 
> replace undelivr and spool with your actual undelivr and spool 
> directories. Run as often as you deem nec. Remember to run it 
> seperately on all undelivr directories (for instance if you are load 
> balancing you may have one on ever server you load balance).
> 
> Create a cfm file with the above and schedule it using the task 
> scheduler.
> 
> If you have received this message multiple times please excuse me, I 
> keep trying to post this and it says it posted but then I don't see 
> anything on the list, perhaps there's a delay I'm not aware of.
> 
> >My project, the Undelivrnator, can be used for this:
> >
> >http://undelivrnator.riaforge.org/
> >
> >Simply set up a scheduled task, a table in the db to use as a monitor, 
> and
> >you're good to go.
> >
> >
> >andy 
> >
> >Hi folks,
> >
> >We need to develop a script that can move mail from the undelivr 
> folder to
> >the spool folder in CF.  My recollection is that there was some talk 
> on this
> >board a while back about this issue and maybe that a script had been
> >developed.  I checked the archives and riaforge with no luck.  Does 
> anyone
> >know if such a script is already built and available?
> >
> >Thanks in advance,
> >
> >Nick 

Hi i have another option to implement the same below is the code:


<cfparam name="directorypath" default="C:\CFusionMX7\Mail\Undelivr\">
<cfdirectory directory="#directorypath#" name="myDirectory" action="list">
<cfoutput>#myDirectory.RecordCount#</cfoutput>
<cfif #myDirectory.RecordCount# gt 0>
        <cfoutput query="mydirectory">
                <cfif #type# EQ "File">
            <cffile action="move" source="#directorypath##name#" 
destination="C:\CFusionMX7\Mail\Spool" >
        </cfif>
    </cfoutput>
</cfif>

But still for such type of code we need to depend on the schedulars in cold 
fusion. In order to perform a more better  way we have Directory watcher 
events, which are called automatically in case a new mail comes to the 
undeliver folder.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314840
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to