Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

imap_mail_move

(PHP 3, PHP 4, PHP 5)

imap_mail_move -- Move specified messages to a mailbox

Описание

bool imap_mail_move ( resource imap_stream, string msglist, string mailbox [, int options] )

Moves mail messages specified by msglist to the specified mailbox.

Список параметров

imap_stream

An IMAP stream returned by imap_open().

msglist

msglist is a range not just message numbers (as described in RFC2060).

mailbox

The mailbox name, see imap_open() for more information

options

options is a bitmask and may contain the single option:

  • CP_UID - the sequence numbers contain UIDS

Возвращаемые значения

Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

Смотрите также

imap_mail_copy()



imap_mail> <imap_mail_copy
Last updated: Fri, 26 Jan 2007
 
add a note add a note User Contributed Notes
imap_mail_move
jim dot bodine at comcast dot net
04-Jul-2007 10:49
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);
                                       
                }

?>
alex at bestgames dot ro
21-Nov-2005 01:36
After using imap_mail_move, imap_mail_copy or imap_delete it is necesary to call imap_expunge() function.
php at guardn dot de
09-Jul-2003 09:06
To move mails via IMAP on an Exchange Server into "Gel
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571