所以这里是一个imap_header
垃圾场...
$header = imap_header($mbox,$cms->page2);
stdClass 对象([日期] => 2013 年 6 月 11 日星期二 19:12:28 -0700 [日期] => 2013 年 6 月 11 日星期二 19:12:28 -0700 [主题] => darnhippies.org 上的帐户论坛被锁定[主题] => darnhippies.org 论坛上的帐户被锁定 [message_id] => <201306120228.417bc449d097@www.darnhippies.org> [toaddress] => webmaster@example.com [to] => Array ([0] => stdClass 对象([邮箱] => 网站管理员 [主机] => example.com)
) [fromaddress] => "darnhippies.org Forum" <webmaster@darnhippies.org> [from] => Array ( [0] => stdClass Object ( [personal] => darnhippies.org Forum [mailbox] => webmaster [host] => darnhippies.org ) ) [reply_toaddress] => "darnhippies.org Forum" <webmaster@darnhippies.org> [reply_to] => Array ( [0] => stdClass Object ( [personal] => darnhippies.org Forum [mailbox] => webmaster [host] => darnhippies.org ) ) [senderaddress] => "darnhippies.org Forum" <webmaster@darnhippies.org> [sender] => Array ( [0] => stdClass Object ( [personal] => darnhippies.org Forum [mailbox] => webmaster [host] => darnhippies.org ) ) [Recent] => [Unseen] => [Flagged] => [Answered] => [Deleted] => [Draft] => [Msgno] => 22 [MailDate] => 11-Jun-2013 20:12:29 -0600 [Size] => 2008 [udate] => 1371003149
我一直试图通过使用$header->Msgno
作为消息 ID 来移动,我认为因为没有消息移动,所以这不是正确的 ID。
那么我是否使用(在此示例中)$header->message_id
作为要移动的消息的 id?
我试过了...
$result1 = imap_mail_move($mbox,'<201306120228.417bc449d097@www.darnhippies.org>','Inbox.Trash');
$result1 = imap_mail_move($mbox,'201306120228.417bc449d097@www.darnhippies.org','Inbox.Trash');
$result1 = imap_mail_move($mbox,'<201306120228.417bc449d097@www.darnhippies.org>','Inbox.Trash',CP_UID);
$result1 = imap_mail_move($mbox,'201306120228.417bc449d097@www.darnhippies.org','Inbox.Trash',CP_UID);
$result1 = imap_mail_move($mbox,'<201306120228.417bc449d097@www.darnhippies.org>','Inbox.Trash','CP_UID');
$result1 = imap_mail_move($mbox,'201306120228.417bc449d097@www.darnhippies.org','Inbox.Trash','CP_UID');
我也尝试使用完整的收件箱名称,包括服务器地址,只是因为。
大约 90% 的时间我都会收到以下错误...
$boxes = imap_getmailboxes($mbox, "{mail.example.com}", "*");
print_r($boxes);
错误:数组([0] => IMAP 协议错误:IMAP 命令复制错误:消息集无效 [1] => IMAP 命令复制错误:消息集无效)
那么如何找到正确的消息 ID 呢?
什么是 UID?
我知道我可以传递一个逗号分隔的 id 列表,我只是想先移动一条消息。