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


PHP InboundEmail::isMailBoxTypeCreateCase方法代碼示例

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


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

示例1: SugarFolder

$createCaseRowStyle = "display:none";
$leaveMessagesOnMailServerStyle = "display:none";
if ($focus->is_personal) {
    $xtpl->assign('EDIT_GROUP_FOLDER_STYLE', "display:none");
} else {
    $groupFolderName = $mod_strings['LBL_NONE'];
    $folder = new SugarFolder();
    if (!empty($focus->groupfolder_id)) {
        $folder->retrieve($focus->groupfolder_id);
        $groupFolderName = $folder->name;
        $leaveMessagesOnMailServerStyle = "display:''";
    }
    // if
    $xtpl->assign('ASSIGN_TO_FOLDER', $groupFolderName);
    $xtpl->assign('EDIT_GROUP_FOLDER_STYLE', "display:''");
    if ($focus->isMailBoxTypeCreateCase()) {
        $createCaseRowStyle = "display:''";
    }
}
$xtpl->assign('LEAVEMESSAGESONMAILSERVER_STYLE', $leaveMessagesOnMailServerStyle);
$xtpl->assign('LEAVEMESSAGESONMAILSERVER', $leaveMessagesOnMailServer);
$xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle);
$xtpl->assign('DISTRIBUTION_METHOD', $distributionMethod);
$xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE', $create_case_email_template_name);
if ($focus->isPop3Protocol()) {
    $xtpl->assign('TRASH_SENT_FOLDER_STYLE', "display:none");
} else {
    $xtpl->assign('TRASH_SENT_FOLDER_STYLE', "display:''");
}
// else
$possibleAction = "pick";
開發者ID:nerdystudmuffin,項目名稱:dashlet-subpanels,代碼行數:31,代碼來源:DetailView.php

示例2: array

}
$stored_options = array();
$stored_options['from_name'] = trim($_REQUEST['from_name']);
$stored_options['from_addr'] = trim($_REQUEST['from_addr']);
$stored_options['reply_to_name'] = trim($_REQUEST['reply_to_name']);
$stored_options['reply_to_addr'] = trim($_REQUEST['reply_to_addr']);
$stored_options['only_since'] = $onlySince;
$stored_options['filter_domain'] = $_REQUEST['filter_domain'];
$stored_options['email_num_autoreplies_24_hours'] = $_REQUEST['email_num_autoreplies_24_hours'];
$stored_options['allow_outbound_group_usage'] = isset($_REQUEST['allow_outbound_group_usage']) ? true : false;
if (!$focus->isPop3Protocol()) {
    $stored_options['trashFolder'] = isset($_REQUEST['trashFolder']) ? trim($_REQUEST['trashFolder']) : "";
    $stored_options['sentFolder'] = isset($_REQUEST['sentFolder']) ? trim($_REQUEST['sentFolder']) : "";
}
// if
if ($focus->isMailBoxTypeCreateCase() || $focus->mailbox_type == 'createcase' && empty($_REQUEST['id'])) {
    $stored_options['distrib_method'] = isset($_REQUEST['distrib_method']) ? $_REQUEST['distrib_method'] : "";
    $stored_options['create_case_email_template'] = isset($_REQUEST['create_case_template_id']) ? $_REQUEST['create_case_template_id'] : "";
}
// if
$storedOptions['folderDelimiter'] = $delimiter;
////////////////////////////////////////////////////////////////////////////////
////    CREATE MAILBOX QUEUE
////////////////////////////////////////////////////////////////////////////////
if (!isset($focus->id)) {
    $groupId = "";
    if (isset($_REQUEST['group_id']) && empty($_REQUEST['group_id'])) {
        $groupId = $_REQUEST['group_id'];
    } else {
        $groupId = create_guid();
    }
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Save.php

示例3: pollMonitoredInboxes

/**
 * Job 1
 */
function pollMonitoredInboxes()
{
    $_bck_up = array('team_id' => $GLOBALS['current_user']->team_id, 'team_set_id' => $GLOBALS['current_user']->team_set_id);
    Log::info('----->Scheduler fired job of type pollMonitoredInboxes()');
    global $dictionary;
    global $app_strings;
    require_once 'modules/Emails/EmailUI.php';
    $ie = new InboundEmail();
    $emailUI = new EmailUI();
    $r = $ie->db->query('SELECT id, name FROM inbound_email WHERE is_personal = 0 AND deleted=0 AND status=\'Active\' AND mailbox_type != \'bounce\'');
    Log::debug('Just got Result from get all Inbounds of Inbound Emails');
    while ($a = $ie->db->fetchByAssoc($r)) {
        Log::debug('In while loop of Inbound Emails');
        $ieX = new InboundEmail();
        $ieX->retrieve($a['id']);
        $GLOBALS['current_user']->team_id = $ieX->team_id;
        $GLOBALS['current_user']->team_set_id = $ieX->team_set_id;
        $mailboxes = $ieX->mailboxarray;
        foreach ($mailboxes as $mbox) {
            $ieX->mailbox = $mbox;
            $newMsgs = array();
            $msgNoToUIDL = array();
            $connectToMailServer = false;
            if ($ieX->isPop3Protocol()) {
                $msgNoToUIDL = $ieX->getPop3NewMessagesToDownloadForCron();
                // get all the keys which are msgnos;
                $newMsgs = array_keys($msgNoToUIDL);
            }
            if ($ieX->connectMailserver() == 'true') {
                $connectToMailServer = true;
            }
            // if
            Log::debug('Trying to connect to mailserver for [ ' . $a['name'] . ' ]');
            if ($connectToMailServer) {
                Log::debug('Connected to mailserver');
                if (!$ieX->isPop3Protocol()) {
                    $newMsgs = $ieX->getNewMessageIds();
                }
                if (is_array($newMsgs)) {
                    $current = 1;
                    $total = count($newMsgs);
                    require_once "include/SugarFolders/SugarFolders.php";
                    $sugarFolder = new SugarFolder();
                    $groupFolderId = $ieX->groupfolder_id;
                    $isGroupFolderExists = false;
                    $users = array();
                    if ($groupFolderId != null && $groupFolderId != "") {
                        $sugarFolder->retrieve($groupFolderId);
                        $isGroupFolderExists = true;
                    }
                    // if
                    $messagesToDelete = array();
                    if ($ieX->isMailBoxTypeCreateCase()) {
                        $users[] = $sugarFolder->assign_to_id;
                        $distributionMethod = $ieX->get_stored_options("distrib_method", "");
                        if ($distributionMethod != 'roundRobin') {
                            $counts = $emailUI->getAssignedEmailsCountForUsers($users);
                        } else {
                            $lastRobin = $emailUI->getLastRobin($ieX);
                        }
                        Log::debug('distribution method id [ ' . $distributionMethod . ' ]');
                    }
                    foreach ($newMsgs as $k => $msgNo) {
                        $uid = $msgNo;
                        if ($ieX->isPop3Protocol()) {
                            $uid = $msgNoToUIDL[$msgNo];
                        } else {
                            $uid = imap_uid($ieX->conn, $msgNo);
                        }
                        // else
                        if ($isGroupFolderExists) {
                            if ($ieX->importOneEmail($msgNo, $uid)) {
                                // add to folder
                                $sugarFolder->addBean($ieX->email);
                                if ($ieX->isPop3Protocol()) {
                                    $messagesToDelete[] = $msgNo;
                                } else {
                                    $messagesToDelete[] = $uid;
                                }
                                if ($ieX->isMailBoxTypeCreateCase()) {
                                    $userId = "";
                                    if ($distributionMethod == 'roundRobin') {
                                        if (sizeof($users) == 1) {
                                            $userId = $users[0];
                                            $lastRobin = $users[0];
                                        } else {
                                            $userIdsKeys = array_flip($users);
                                            // now keys are values
                                            $thisRobinKey = $userIdsKeys[$lastRobin] + 1;
                                            if (!empty($users[$thisRobinKey])) {
                                                $userId = $users[$thisRobinKey];
                                                $lastRobin = $users[$thisRobinKey];
                                            } else {
                                                $userId = $users[0];
                                                $lastRobin = $users[0];
                                            }
                                        }
//.........這裏部分代碼省略.........
開發者ID:butschster,項目名稱:sugarcrm_dev,代碼行數:101,代碼來源:_AddJobsHere.php

示例4: testisMailBoxTypeCreateCase

 public function testisMailBoxTypeCreateCase()
 {
     //unset and reconnect Db to resolve mysqli fetch exeception
     global $db;
     unset($db->database);
     $db->checkConnection();
     $inboundEmail = new InboundEmail();
     //test without setting attributes
     $result = $inboundEmail->isMailBoxTypeCreateCase();
     $this->assertEquals(false, $result);
     //test with attributes set
     $inboundEmail->mailbox_type = 'createcase';
     $inboundEmail->groupfolder_id = 1;
     $result = $inboundEmail->isMailBoxTypeCreateCase();
     $this->assertEquals(true, $result);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:16,代碼來源:InboundEmailTest.php


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