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
cfuserAsked:
Who is Participating?
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.

Tomarse111Commented:
I don't believe you can move do this through cfpop .. to the best of my knowledge the physically protocol does not allow this:

http://www.networksorcery.com/enp/protocol/pop.htm shows functionality available. You may need to think of using something like imap etc
0
Gurpreet Singh RandhawaWeb DeveloperCommented:
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!
0
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 ..

<cfimap 
  action ="DELETE|DELETEFOLDER|CREATEFOLDER|OPEN|CLOSE|RENAMEFOLDER|LISTALLFOLDERS| MARKREAD|MOVEMAIL|GETALL|GETHEADERONLY"     
  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

<cfimap 
        action="MoveMail" 
        newfolder="Folder1" 
        messagenumber="1,2" 
        stoponerror="true" 
        connection="test.cf.gmail"> 

Open in new window

0

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..

http://coldfusion.sys-con.com/node/41597  -- JAVAMAIL

IMAP CFC

http://www.opensourcecf.com/CFOpenMail/imapcfc_view.cfm
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.