PHP Classes

read new mails without deleting

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  read new mails without deleting  >  (Un) Subscribe thread alerts  
Subject:read new mails without deleting
Summary:read only unread mails and sort out the read and unread mails
Messages:7
Author:shrishail
Date:2011-05-09 15:14:51
Update:2011-05-10 07:02:10
 

  1. read new mails without deleting   Reply   Report abuse  
Picture of shrishail shrishail - 2011-05-09 15:14:53
Hello sir,
i am using pop3 class since long time.Its working great.
Actually I am using the pop3/mimeparser class in part of my application which allows people to add their pop3 account details (i.e the server name, username, password)
When using peoples account, i should not delete there mails because
it is inconvienient service to the people.
so, is there any way to sort the read mails and pop only new mails without deleting the current one.
As discussed in forums ,some servers change the status headers after reading the mail.
May i know how to check the status header and only read new mails.

Thank you for your valuable support.

Regards,
Shrishail

  2. Re: read new mails without deleting   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-09 19:54:50 - In reply to message 1 from shrishail
The class does not delete it mails if you do not call the DeleteMessage function.

Some servers change the header Status of the message to mark it as read but this is not a standard practice.

  3. Re: read new mails without deleting   Reply   Report abuse  
Picture of shrishail shrishail - 2011-05-10 04:36:04 - In reply to message 2 from Manuel Lemos
Thank you sir,
If i do not call the delete message function, same message gets read again and again.I don't want this to happen because i am inserting the mail parts into the database after the mail downloads.
So i want to pop only unread mails. Also how to check the header status
of the mails.

Regards,
Shrishail

  4. Re: read new mails without deleting   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-10 04:54:22 - In reply to message 3 from shrishail
What you are saying does not seem to make much sense. You said before that you do not want to delete the read messages. Now you say that if you do not delete the messages always get read on every access.

If you are retrieving the messages to your application database you can keep control of the read status on your database, thus without relying on the POP 3 server status.

  5. Re: read new mails without deleting   Reply   Report abuse  
Picture of shrishail shrishail - 2011-05-10 05:46:26 - In reply to message 4 from Manuel Lemos
My query is as follows:

1.In my application i am reading the mails from customer account.

2.When i read the mails i.e pop mail from the customer account ,the decoded parts of the mail is getting stored in the database.

Now the problem is like :

I run cronjob every minute

if there are three new mails in the inbox ,when i run the 1st cronjob those three mails will be read from the inbox without deleting them. After that if the customer recieves two more new mails ,while running the next cronjob i want to read two new mails only and not the old three mails which i have already read....

And the 2nd thing i want is, is there anyway to check the status of the mail which has been already popped?

so plz suggest me is there any way to do this....





  6. Re: read new mails without deleting   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-10 06:29:23 - In reply to message 5 from shrishail
You need to make up your mind on whether you want to delete the messages or not.

If you decide that you want to delete the messages, all new messages are unread.

If you decide that you do not want to delete the messages, it may not be possible to determine accurately if the messages were read or not.

In this case you may try to check the Status header to see if any new messages are unread. If this does not work with your mail server, you may try to use the message-id of each message and store in your database to keep track of read messages.

  7. Re: read new mails without deleting   Reply   Report abuse  
Picture of shrishail shrishail - 2011-05-10 07:02:10 - In reply to message 6 from Manuel Lemos
As you said,it's better to insert message-id into database and check it when
new mail downloads.I will not delete the message after read.

Thank you for valuable suggestion.