當前位置: 首頁>>代碼示例>>PHP>>正文


PHP InboundEmail::getUIDLForMessage方法代碼示例

本文整理匯總了PHP中InboundEmail::getUIDLForMessage方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::getUIDLForMessage方法的具體用法?PHP InboundEmail::getUIDLForMessage怎麽用?PHP InboundEmail::getUIDLForMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在InboundEmail的用法示例。


在下文中一共展示了InboundEmail::getUIDLForMessage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: pollMonitoredInboxesForBouncedCampaignEmails

function pollMonitoredInboxesForBouncedCampaignEmails()
{
    $GLOBALS['log']->info('----->Scheduler job of type pollMonitoredInboxesForBouncedCampaignEmails()');
    global $dictionary;
    $ie = new InboundEmail();
    $r = $ie->db->query('SELECT id FROM inbound_email WHERE deleted=0 AND status=\'Active\' AND mailbox_type=\'bounce\'');
    while ($a = $ie->db->fetchByAssoc($r)) {
        $ieX = new InboundEmail();
        $ieX->retrieve($a['id']);
        $ieX->connectMailserver();
        $GLOBALS['log']->info("Bounced campaign scheduler connected to mail server id: {$a['id']} ");
        $newMsgs = array();
        if ($ieX->isPop3Protocol()) {
            $newMsgs = $ieX->getPop3NewMessagesToDownload();
        } else {
            $newMsgs = $ieX->getNewMessageIds();
        }
        //$newMsgs = $ieX->getNewMessageIds();
        if (is_array($newMsgs)) {
            foreach ($newMsgs as $k => $msgNo) {
                $uid = $msgNo;
                if ($ieX->isPop3Protocol()) {
                    $uid = $ieX->getUIDLForMessage($msgNo);
                } else {
                    $uid = imap_uid($ieX->conn, $msgNo);
                }
                // else
                $GLOBALS['log']->info("Bounced campaign scheduler will import message no: {$msgNo}");
                $ieX->importOneEmail($msgNo, $uid, false, false);
            }
        }
        imap_expunge($ieX->conn);
        imap_close($ieX->conn);
    }
    return true;
}
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:36,代碼來源:_AddJobsHere.php

示例2: while

    while ($a = $ie->db->fetchByAssoc($r)) {
        $ieX = new InboundEmail();
        $ieX->retrieve($a['id']);
        $ieX->connectMailserver();
        //$newMsgs = $ieX->getNewMessageIds();
        $newMsgs = array();
        if ($ieX->isPop3Protocol()) {
            $newMsgs = $ieX->getPop3NewMessagesToDownload();
        } else {
            $newMsgs = $ieX->getNewMessageIds();
        }
        if (is_array($newMsgs)) {
            foreach ($newMsgs as $k => $msgNo) {
                $uid = $msgNo;
                if ($ieX->isPop3Protocol()) {
                    $uid = $ieX->getUIDLForMessage($msgNo);
                } else {
                    $uid = imap_uid($ieX->conn, $msgNo);
                }
                // else
                $ieX->importOneEmail($msgNo, $uid);
            }
        }
        imap_expunge($ieX->conn);
        imap_close($ieX->conn);
    }
    header('Location: index.php?module=Emails&action=ListViewGroup');
} else {
    // fail gracefully
    header('Location: index.php?module=Emails&action=index');
}
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:31,代碼來源:Check.php

示例3: testgetUIDLForMessage

 public function testgetUIDLForMessage()
 {
     $inboundEmail = new InboundEmail();
     $inboundEmail->id = 1;
     //test with invalid msgNo
     $result = $inboundEmail->getUIDLForMessage('2');
     $this->assertEquals('', $result);
     //test with valid msgNo
     $result = $inboundEmail->getUIDLForMessage('1');
     $this->assertEquals('1', $result);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:11,代碼來源:InboundEmailTest.php


注:本文中的InboundEmail::getUIDLForMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。