imap_setflag_full
imap_setflag_full
Sets flags on messages
true **imap_setflag_full** IMAP\Connection $imap string $sequence string $flag int $options
Causes a store to add the specified to the
flags set for the messages in the specified
.
flag``sequence
sequence
A sequence of message numbers. You can enumerate desired messages
with the syntax, or retrieve all messages
within an interval with the syntax
X,Y``X:Y
flag
The flags which you can set are ,
, ,
, and as
defined by .
\Seen``\Answered``\Flagged``\Deleted``\DraftRFC2060
options
A bit mask that may contain the single option:
- - The sequence argument contains UIDs instead of sequence numbers `ST_UID`
return.true.always
Throws a if
is invalid.
ValueError``options
Voorbeeld: example
<?php
$mbox = imap_open("{imap.example.org:143}", "username", "password")
or die("can't connect: " . imap_last_error());
$status = imap_setflag_full($mbox, "2,5", "\\Seen \\Flagged");
echo gettype($status) . "\n";
echo $status . "\n";
imap_close($mbox);
?>
imap_clearflag_full