Though your solution of creating a new cfmail would be just as easy, if not easier, to implement.
Cedric Villat
http://www.cornfeed.com
>Hello all,
>
>About 1000 emails (.cfmail) are sitting in my Undelivr folder because
>I've got the wrong mail server set. With a simple change on the 2nd line
>of every .CFMail file, these email files would be OK. Using code from
>evolt, I've managed to replace the offending line with the correct mail
>server and set it as a variable, but writing it to the .cfmail file is a
>different story. Or is it? If I could write this change to the file, I'd
>be good to go. Is this possible using CF or any other program?
>Hopefully, I'm missing something simple. (I'm using CF 5).
>
>The code below does everything I want it to except modify the file
>before moving it to the Spool folder. Thanks in advance for any
>assistance.
>
><CFPARAM NAME="tmpUndeliverDefaultPath"
>DEFAULT="C:\CFUSION\MAIL\UNDELIVR\">
><CFPARAM NAME="tmpSpoolDefaultPath" DEFAULT="C:\CFUSION\MAIL\SPOOL\">
><CFDIRECTORY ACTION="" DIRECTORY="#tmpUndeliverDefaultPath#"
>NAME="qryDir" SORT="Name" FILTER="*.cfmail">
><CFIF qryDir.RecordCount>
> <CFOUTPUT QUERY="qryDir">
> <CFFILE ACTION="" FILE="#tmpUndeliverDefaultPath##qryDir.Name#"
>VARIABLE="tmpTxt">
> READING #QRYDIR.Name#...<br />
> <CFSET tmpEmailContents = ListToArray(tmpTxt,Chr(10))>
> <CFSET tmpEmail =
>Trim(ReplaceNoCase(tmpEmailContents[2],"mail.ioc.state.il.us","ioc-web-n
>av"))>
> <CFFILE ACTION="" SOURCE="#tmpUndeliverDefaultPath##qryDir.Name#"
>DESTINATION="#tmpSpoolDefaultPath##qryDir.Name#">
></CFOUTPUT>
></CFIF>
>
>Sincerely,
>
>Andrew
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

