Regarding Receiving Pop3 emails

Recently i have got a requirement where i need to read emails from an pop3 inbox and read emails and write the body to sharepoint list.

Now my requirement is after i read all the emails by using pop3 i want to move them to a new folder .Is it possible??

   Like if my Sharepoint timer job will execute the pop3 code it will not take the mails which it has already supplied to sharepoint list.Unless i follow this approach bidirectional checks would be very expensive from bothe sharepoint side.

My requirement is very simple

1)Read the emails
2)Move them to an archieve folder

  Next time only the new emails would be read not the old ones.
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.

Dennis AriesCEO @ Arkro ITCommented:
You cannot move items using POP3. You can delete them though if you do not need them in the mailbox anymore.
Furthermore, each message has an unique ID that can be used to decide wether or not to read it from the mailbox, so by using that ID as a reference (which you will also store in your Sharepoint list), you will know which items to process or not.
you should better use IMAP for this.
Éric MoreauSenior .Net ConsultantCommented:
Pop3 cannot do neither of these. check
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

sukeshjhAuthor Commented:
Okay i have got following doubts

1)My server is pop3 server,How can i use IMAP for this? i saw somewhere it is possible to read unread messages.Can i use IMAP for pop3 server which is configured.
2)I used Indy.socket.dll for this operation which has in built methods for retrieving body,subject etc.
3)I am not sure the message id is unique as i observerd pop3 is only reading the mails sent today and also it assigns sequence number to the returned LIST items that's it.they all are like 1,2,3,4..Are these IDs unique.
4)Let me know if i can use IMAP for this?
1) no. your mail server should be configured for IMAP as well. If you want to use IMAP. And yes, It is possible to read unread messages using IMAP.
2) I am not sure about the dll. But you need to make sure that it supports mail retrieval using IMAP. Else, you can write your own code for that.
3) dont get confused with the sequence number. Sequence number is like position of that message in the queue. As the position changes, and some message ahead of it gets deleted, the message number reduces. Message ID can be get by UIDL and is unique though. Another message ID will be in the body of the mail, which is a unique stamp made by the mail server.
4) I hope I hav answered your queries. :) You can use if your mail sever and the socket dll support it.

Let me know if you have any further questions.

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
Dave HoweSoftware and Hardware EngineerCommented:
If your current mail provider doesn't provide imap, consider using Google as a intermediatory - they offer IMAPS (IMAP over SSL) as part of the basic (free) service and can collect your mail from other pop3 providers. Similarly, they provide SMTPS (smtp mail over ssl) for outbound mail.

pop3 can do only three things

1) access mail in your inbox
2) mark it read
3) delete it

pop3 lacks the concept of folders, so cannot be used for that.
sukeshjhAuthor Commented:
Hi can i get some useful links where i can know all the following

1)Configuring pop3 server for IMAP as well ??
2)IMAP coding where i can create folders and move messages or mark messages Read
3)Getting the uniqueID of each message in pop3 and IMAP ??

1) You need to first tell what is the mail server you are using. The configurations and possibilities vary from mail server to mail server.
2) You can check out:
3) its UIDL for pop3 and it will come as a reply to the fetch command in case of imap.

Let us know if you have any further doubts.
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
Email Protocols

From novice to tech pro — start learning today.