I'm trying to something dead simple with CFPOP.  I retrieve all of the email
from a mailbox, loop through the messages, parse the message and place data
from the message body into a database.  To avoid importing the data more
than once, I delete the message when I'm done with it.

For some reason, I'm occasionally getting an error "Specified Message Out of
Range" when doing the <cfpop action="delete">.  The code goes something like
this:

<cfpop server="mail.mydomain.com"
       username="mymailbox"
       pasword="mypassword"
       action="getall"
       name="mailquery"
       timeout="120">

<cfloop query="mailquery">
  <!--- Do stuff with mailquery.body --->
  ...

  <cfpop server="mail.mydomain.com"
         username="mymailbox"
         pasword="mypassword"
         action="delete"
         messagenumber="1"
         timeout="30">
</cfloop>

My (admittedly poor) understanding is that 'messagenumber' is the number of
the nth message currently in the mailbox.  So, if within the loop I'm
deleting message #1 each time, I should be referring to the message
currently being processed.  Is that right?

So, I retrieve 100 messages and each time through the loop I delete one,
each time it's messge #1 that I delete.  Why should the messagenumber ever
be out of range????

Jim

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to