Assume that the mail folder is in c:\ims\mail and you want to put the mail
into a single account (remember, the TO field of an email does not
necessarily indicate the recipient of a message).
I don't have exact code but it's something like:
<!--- get list of files --->
<cfdirectory action="list" directory="c:\ims\mail" name="mail"
filer="*.mail">
<!--- loop through the list of files --->
<cfloop query="mail">
<!--- get headers and text of message --->
<cflock timeout="60" name="odsmime">
<cfx_odsmime file="c:\ims\mail\#name#" action="list">
</cflock>
<!--- insert into database --->
<cfquery datasource="...">
insert into messages (from, msgto, ... , body)
values ('#odsmime_from#','#odsmime_to#',...,'#odsmime_text#')
</cfquery>
</cfloop>
Please let me know if you have any questions.
Regards,
Howie
----- Original Message -----
From: "ewrer rewr" <[EMAIL PROTECTED]>
To: "inFusion Support List" <[EMAIL PROTECTED]>
Sent: Monday, November 27, 2000 4:17 PM
Subject: [iMS] re-process mail
> Hi all,
>
> Looking for a template that can read the ims/read directory and insert all
the
> messages into an SQL database.
>
> Thanks
> Emmanuel