I want to create a script in php to read al mail from a mail acount. I connect to the server, I can see the mails but went I want to seet it back to unseen I can't find a function to do this.
+1
A:
If I understand this page correctly:
http://www.php.net/manual/en/function.imap-body.php
You can use the FT_PEEK option to leave the message as 'unread'.
EDIT AFTER YOU COMMENTS
Have you looked at this method?:
http://www.php.net/manual/en/function.imap-clearflag-full.php
You are able to clear the \\Seen flag.
Rew
2009-10-22 07:46:40
I know this. But if see the body and than I return to index.php how can I set it back to unseen ?
Emanuel
2009-10-22 07:50:23
I'm sorry - I don't understand exactly what it is you're trying to do. Can you give a step by step explanation?
Rew
2009-10-22 07:52:20
In any mail client (Yahoo Mail, GMail ...) you have this options: "Mark as unread", "Mark as read". How can be done something like this in php?
Emanuel
2009-10-22 08:01:07
A:
Roll your own. You should learn about socket() and the IMAP protocol.
Martin Hohenberg
2009-10-22 07:47:14
A:
Hi this is not the answer for your question. I am trying to do the same what you have achieved but i could not even read any messages of my gmail account so can you assist me how you did using php. i am using xampp 1.7.2 and imap of that xampp..
pradeepa
2009-12-10 05:11:15