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


PHP InboundEmail::importMessages方法代碼示例

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


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

示例1: InboundEmail

 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
global $current_user;
if (isset($_REQUEST['type']) && $_REQUEST['type'] == 'personal') {
    if ($current_user->hasPersonalEmail()) {
        $ie = new InboundEmail();
        $beans = $ie->retrieveByGroupId($current_user->id);
        if (!empty($beans)) {
            /** @var InboundEmail $bean */
            foreach ($beans as $bean) {
                $bean->importMessages();
            }
        }
    }
    header('Location: index.php?module=Emails&action=ListView&type=inbound&assigned_user_id=' . $current_user->id);
} elseif (isset($_REQUEST['type']) && $_REQUEST['type'] == 'group') {
    $ie = new InboundEmail();
    // this query only polls Group Inboxes
    $r = $ie->db->query('SELECT inbound_email.id FROM inbound_email JOIN users ON inbound_email.group_id = users.id WHERE inbound_email.deleted=0 AND inbound_email.status = \'Active\' AND mailbox_type != \'bounce\' AND users.deleted = 0 AND users.is_group = 1');
    while ($a = $ie->db->fetchByAssoc($r)) {
        $ieX = new InboundEmail();
        $ieX->retrieve($a['id']);
        $ieX->importMessages();
    }
    header('Location: index.php?module=Emails&action=ListViewGroup');
} else {
    // fail gracefully
    header('Location: index.php?module=Emails&action=index');
}
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Check.php

示例2: pollMonitoredInboxesForBouncedCampaignEmails

function pollMonitoredInboxesForBouncedCampaignEmails()
{
    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();
        $ieX->importMessages();
    }
    return true;
}
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:14,代碼來源:_AddJobsHere.php

示例3: testimportMessages

 public function testimportMessages()
 {
     $inboundEmail = new InboundEmail();
     //execute the method and test if it works and does not throws an exception.
     try {
         $inboundEmail->protocol = 'pop3';
         $inboundEmail->importMessages();
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:12,代碼來源:InboundEmailTest.php


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