Answer the question
In order to leave comments, you need to log in
How to make an email have an "Unread" flag, PHP: imap_open(), getMailPart()
Hello!
I receive letters through the functions of the imap PHP extension.
As soon as the body of the letter is read to the end through the function: imap_fetchbody () - then on the server itself, this letter is displayed as read. And how to make it remain unread on the server?
Answer the question
In order to leave comments, you need to log in
en2.php.net/imap_fetchbody
FT_PEEK - Do not set the \Seen flag if not already set
imap_fetchbody ($imap_stream, $msg_number, $section, FT_PEEK);
Clears the value of the flag specified in the parameter:
imap_clearflag_full($mailBoxHandler, $mailNum, "\\Seen");
It helps me.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question