M
M
Madion2014-06-05 10:22:37
PHP
Madion, 2014-06-05 10:22:37

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

2 answer(s)
V
Vyacheslav Slinko, 2014-06-05
@KeepYourMind

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);

N
Nick Logiq, 2015-02-27
@sattvadigit

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 question

Ask a Question

731 491 924 answers to any question