2

我正在将这些库用于我正在构建的电子邮件应用程序。

$storage = new Zend_Mail_Storage_Imap($imap);

if (strpos($storage->getMessage($i),'chocolate') !== FALSE ) 

{
        //Move to chocolate folder here
}

另外,有没有办法让这个发件人收到的电子邮件从现在开始自动进入巧克力文件夹?...类似于在 gmail 中构建标签的方式,来自该发件人的所有邮件将来都会自动进入该文件夹。

我还是zend的新手,我将再次重新查看文档。

4

1 回答 1

3

这有点棘手是真的。

$storage = new Zend_Mail_Storage_Imap($imap);
if (strpos($storage->getMessage($i),'chocolate') !== FALSE ){
    //Move to chocolate folder here
    $messageUniqueId = $storage->getUniqueId($i);
    $currentMessageId = $storage->getNumberByUniqueId($messageUniqueId);
    $storage->moveMessage($messageUniqueId, 'chocolate');
}
于 2011-03-30T13:11:05.493 回答