note 76207 added to function.imap-mail-move
| From: | jimdotbodineatcomcastdotnet at osu1 dot php dot net | Date: | Thu, 05 Jul 2007 05:49:25 +0000 |
| Subject: | note 76207 added to function.imap-mail-move | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128241@lists.php.net to get a copy of this message | ||
I offer the following example because it took me HOURS to figure this out
<?php
$this->mailInBox = imap_open($this->mailConnectString."INBOX",
$this->accountLogin, $this->accountPassword);
$this->messageCount = imap_num_msg($this->mailInBox);
echo "Processing " . $this->messageCount . " messages:<Br>";
for ($i = 1; $i <= $this->messageCount; ++$i) {
$header = imap_header($this->mailInBox, $i);
$prettydate = date("jS F Y", $header->udate);
$fromHost = $header->from[0]->host;
if (isset($header->from[0]->personal)) {
$personal = $header->from[0]->personal;
} else {
$personal = $header->from[0]->mailbox;
}
$body = imap_fetchbody($this->mailInBox, $i, "1.1");
if ($body == "") {
$body = imap_fetchbody($this->mailInBox, $i, "1");
}
$move = "INBOX.processed" . date("Ymd");
echo "trying to move:" . $i . "<br>";
@imap_mail_move($this->mailInBox, $i, $move);
}
?>
----
Server IP: 208.69.120.35
Probable Submitter: 71.194.250.76
----
Manual Page -- http://www.php.net/manual/en/function.imap-mail-move.php
Edit -- https://master.php.net/note/edit/76207
Del: integrated -- https://master.php.net/note/delete/76207/integrated
Del: useless -- https://master.php.net/note/delete/76207/useless
Del: bad code -- https://master.php.net/note/delete/76207/bad+code
Del: spam -- https://master.php.net/note/delete/76207/spam
Del: non-english -- https://master.php.net/note/delete/76207/non-english
Del: in docs -- https://master.php.net/note/delete/76207/in+docs
Del: other reasons-- https://master.php.net/note/delete/76207
Reject -- https://master.php.net/note/reject/76207
Search -- https://master.php.net/manage/user-notes.php