BTW...I meant "we" as in Dealerskins. 

-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 10, 2008 8:25 AM
To: cf-talk
Subject: RE: Script to move email to from undelivr to spool?

Bobby (and anyone else)...

Undelivrnator gets a list of all files in the undelivr folder. It loops over
the list checking filename and datestamp against a database entry. If it
finds that email filename and datestamp in the db, then it increments the
count for it. If it doesn't find it, it inserts a record. After trying 3
times, it simply deletes the email.

We have a scheduled task set to run every 12 hours on each of our web
servers. Lastly we clear out the db entries on a rolling 90 day interval.
Full disclosure, the email piece is based on SpoolMail by Ray Camden.

http://undelivrnator.riaforge.org/


andy

-----Original Message-----
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2008 5:14 PM
To: cf-talk
Subject: RE: Script to move email to from undelivr to spool?

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:315019
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to