Move already read messages to a different folder

I am using cfpop action="getall" to get messages from my pop3 server. Once I read the messages, I would like to move those messages to a custom folder on my pop3 server. How can I do that in coldfusion. Please help. Thanks
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't believe you can move do this through cfpop .. to the best of my knowledge the physically protocol does not allow this: shows functionality available. You may need to think of using something like imap etc
Gurpreet Singh RandhawaCEOCommented:
Well! at a Round way!

After you download all the Messages from the pop mail, store them in the database and then show them on the scren!, after that once you read, apply a filter to move the read messages to otehr folder!

And yes you have to download the messages to the DB and then you can play around! Directly you cannot any Specific Rule! as

like in outlook you can create a rule that once specific messages, move to another folder, the default behavious of POP is not like this!

if u are on CF 9 use cfimap!
Brijesh ChauhanStaff IT EngineerCommented:
As already suggested in first comment, you will NOT be able to do it with POP, the protocol does NOT support it, so either you can get all the messages or delete them, moving to a different folder is NOT possible my POP.

Use IMAP, CF has CFIMAP tag ..

  attachmentpath = "string"  
  connection = "string" 
  folder = "string" 
  generateuniquefilenames = "yes|no" 
  maxrows = "integer" 
  messagenumber ="integer" 
  name = "string" 
  newfolder = "string" 
  password = "string" 
  port = "integer" 
  recurse = "true|false" 
  secure = "yes|no"  
  server = "IMAP server address" 
  startrow = "integer" 
  secure = "yes|no"  
  stoponerror = "true|false" 
  uid = "integer or comma-delimited list of integers" 
  username = "SMTP user ID">

Open in new window

to move mail use the MOVMAIL action


Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brijesh ChauhanStaff IT EngineerCommented:
If you are NOT on CF9, you can use JAVAMAIL or a custom CFC..  -- JAVAMAIL

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.