Really? No cfexecute solutions? tsk tsk

<cfexecute name="C:\windows\system32\cmd.exe" arguments="/c move
C:\coldfusion8\mail\undelivr\* C:\coldfusion8\mail\spool\" />

Just setup a scheduled task to hit a page with that on it as often as you
need.

Of course... you are going to begin to collect emails that CF just can't
send for whatever reason and will want to clean it out periodically.

I can think of a few ways to handle it.

One would be to loop the contents of undelivr into a database with a
timestamp or a count to keep track of when or how many times it has been
moved back to the spool in an attempt to send it.

Delete the files after so many attempts (and the records)

And again, have the whole process triggered by a scheduled task.

Not sure if Andy's "Undelivrnator" handles it that way but I plan to find
out since we need to do something like this at work soon. :-)

..:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com

-----Original Message-----
From: sachin chawla [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2008 8:02 AM
To: cf-talk
Subject: Re: Script to move email to from undelivr to spool?

Hi Nick try this....

<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>

and add a schedular in the cold fusion administrator. Still apart from this
we have another alternative of using Directory watcher Events, which do not
need a schedular, they are invoked automatically when a new file 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:314977
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