Thank you for your responses !
Unfortunately, no, the individual mail items are not in separate files in
each folder. As you both point out, it's not a real problem if they were. I
also wasn't as clear as I should have been in describing the issue.
The structure is essentially a base folder (a "real" windows folder), named
the same as the individual's email address. Within this folder are a varying
number of files in the form: foldername.mbx. So if you stored items from
the CFTalk list in "folder" named "ColdFusion", the name of the "folder"
(really a file), would be "ColdFusion.mbx".
The individual mail items in the "folder" file are delimited, but upon
initial inspection, it is unclear what the exact delimiter is, especially
with stored messages that have embedded messages (">>>"). I thought that
using MESSAGE ID might be OK, but now I'm not so sure.
The manager of our email system is contacting Ipswitche to see if they can
clarify, but according to him, their tech support is sometimes a little
"spotty". I have seen several references to iMail on the list, and hoped
they someone might be able to provide more definitive information on the way
messages were stored.
Though not applicable to my particular task, I do like the code examples (I
collect code snippets) you both sent, and will save them for future
reference.
Thank you for your assistance and willingness to share your expertise with
us !
-Gerry
Gerard T. Pauline
Mgr, Internet Applications &
University WebMaster
Computer Systems, DoIT
Pace University
-----Original Message-----
From: Craig Dudley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 8:05 AM
To: CF-Talk
Subject: RE: Counting Mail Messages In A Folder
Are the messages actual files or are they stored in some sort of
exchange like database?
If they are actual files, then it should be easy using cfdirectory
alone, the windows file system as Brook suggested or even with java
(java.io.File).
You'll just need to done a little recursion inside the mail store
folder, not hard at all.
This custom tag recurses through an entire dir tree and returns a query
which you could then use QoQ on easily.
Calling Page
------------------
<cfset basedir = "c:\mailroot\">
<cf_dir basedir = "#basedir#">
<cfdump var="#request.filelist#">
TAG (save as dir.cfm)
-----
<cfparam name="request.filelist"
default="#QueryNew('Filename,FileDate,Size')#">
<cfdirectory action="" directory="#attributes.basedir#" name="list">
<cfloop query="list">
<cfif type is "File">
<cfscript>
QueryAddRow(request.filelist);
QuerySetCell(request.filelist,"FileName","#attributes.basedir##name#");
QuerySetCell(request.filelist,"FileDate","#DateLastModified#");
QuerySetCell(request.filelist,"Size","#Size#");
</cfscript>
<cfelse>
<cfif NOT (name is "." or name is "..")>
<cf_dir basedir = "#attributes.basedir##name#\">
</cfif>
</cfif>
</cfloop>
-----Original Message-----
From: Gerry Pauline [mailto:[EMAIL PROTECTED]
Sent: 13 October 2003 22:26
To: CF-Talk
Subject: Counting Mail Messages In A Folder
CF-Pros:
We have several report utilities written in CF to report on our
system, Ipswitches iMail.
We've been asked to look into a utility (acquire/build) to count
the
number of messages in each folder.
Questions:
* What is the delimiter for messages in a folder (is it the same
for all
mail servers, or unique to a particular mailer, again, we use
Ipswitches's iMail, latest version)
* I believe some of you are iMail users, anyone aware of utility
similar
to what we are interested in ?
Thank you.
-Gerry
Gerard T. Pauline
Computer Systems, DoIT
Pace University
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

