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


PHP InboundEmail::save方法代碼示例

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


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

示例1: testsaveAndOthers

 public function testsaveAndOthers()
 {
     error_reporting(E_ERROR | E_PARSE);
     //unset and reconnect Db to resolve mysqli fetch exeception
     global $db;
     unset($db->database);
     $db->checkConnection();
     $inboundEmail = new InboundEmail();
     $inboundEmail->name = 'test';
     $inboundEmail->group_id = 1;
     $inboundEmail->status = 'Active';
     $inboundEmail->email_user = 'testuser';
     $inboundEmail->email_password = 'testpass';
     $inboundEmail->mailbox = 'mailbox1,mailbox2,mailbox3';
     $inboundEmail->save();
     //test for record ID to verify that record is saved
     $this->assertTrue(isset($inboundEmail->id));
     $this->assertEquals(36, strlen($inboundEmail->id));
     //test getCorrectMessageNoForPop3 method
     $this->getCorrectMessageNoForPop3($inboundEmail->id);
     //test retrieve method
     $this->retrieve($inboundEmail->id);
     //test retrieveByGroupId method
     $this->retrieveByGroupId($inboundEmail->group_id);
     //test retrieveAllByGroupId method
     $this->retrieveAllByGroupId($inboundEmail->group_id);
     //test retrieveAllByGroupIdWithGroupAccounts method
     $this->retrieveAllByGroupIdWithGroupAccounts($inboundEmail->group_id);
     //test getSingularRelatedId method
     $this->getSingularRelatedId();
     //test renameFolder method
     $this->renameFolder($inboundEmail->id);
     //test search method
     $this->search($inboundEmail->id);
     //test saveMailBoxFolders method
     $this->saveMailBoxFolders($inboundEmail->id);
     //test saveMailBoxValueOfInboundEmail method
     $this->saveMailBoxValueOfInboundEmail($inboundEmail->id);
     //test mark_deleted method
     $this->mark_deleted($inboundEmail->id);
     //test hardDelete method
     $this->hardDelete($inboundEmail->id);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:43,代碼來源:InboundEmailTest.php

示例2: setUp

 public function setUp()
 {
     global $current_user, $currentModule;
     $mod_strings = return_module_language($GLOBALS['current_language'], "Contacts");
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $this->outbound_id = uniqid();
     $time = date('Y-m-d H:i:s');
     $ib = new InboundEmail();
     $ib->is_personal = 1;
     $ib->name = "Test";
     $ib->port = 3309;
     $ib->mailbox = 'empty';
     $ib->created_by = $current_user->id;
     $ib->email_password = "pass";
     $ib->protocol = 'IMAP';
     $stored_options['outbound_email'] = $this->outbound_id;
     $ib->stored_options = base64_encode(serialize($stored_options));
     $ib->save();
     $this->ib = $ib;
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:20,代碼來源:Bug32487Test.php

示例3: isset

    if ($_REQUEST['leaveMessagesOnMailServer'] == "1") {
        $stored_options['leaveMessagesOnMailServer'] = 1;
    } else {
        $stored_options['leaveMessagesOnMailServer'] = 0;
    }
}
$focus->stored_options = base64_encode(serialize($stored_options));
$GLOBALS['log']->info('----->InboundEmail now saving self');
////////////////////////////////////////////////////////////////////////////////
////    SEND US TO SAVE DESTINATION
////////////////////////////////////////////////////////////////////////////////
//When an admin is creating an IE account we do not want their private team to be added
//or they may be included in a round robin assignment.
$previousTeamAccessCheck = isset($GLOBALS['sugar_config']['disable_team_access_check']) ? $GLOBALS['sugar_config']['disable_team_access_check'] : null;
$GLOBALS['sugar_config']['disable_team_access_check'] = TRUE;
$focus->save();
//Reset the value so no other saves are affected.
$GLOBALS['sugar_config']['disable_team_access_check'] = $previousTeamAccessCheck;
//Sync any changes within the IE account that need to be synced with the Sugar Folder.
//Need to do this post save so the correct team/teamset id is generated correctly.
$monitor_fields = array('name', 'status');
//Only sync IE accounts with a group folder.  Need to sync new records as team set assignment is processed
//after save.
if (!empty($focus->groupfolder_id)) {
    foreach ($monitor_fields as $singleField) {
        //Check if the value is being changed during save.
        if ($focus->fetched_row[$singleField] != $focus->{$singleField}) {
            syncSugarFoldersWithBeanChanges($singleField, $focus);
        }
    }
}
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Save.php

示例4: array

 function _createInboundAccount()
 {
     global $inbound_account_id, $current_user;
     $stored_options = array();
     $stored_options['from_name'] = "UnitTest";
     $stored_options['from_addr'] = "ajaysales@sugarcrm.com";
     $stored_options['reply_to_name'] = "UnitTest";
     $stored_options['reply_to_addr'] = "ajaysales@sugarcrm.com";
     $stored_options['only_since'] = false;
     $stored_options['filter_domain'] = "";
     $stored_options['trashFolder'] = "INBOX.Trash";
     $stored_options['leaveMessagesOnMailServer'] = 1;
     $useSsl = false;
     $focus = new InboundEmail();
     $focus->name = "Ajay Sales Personal Unittest";
     $focus->email_user = "ajaysales@sugarcrm.com";
     $focus->email_password = "f00f004";
     $focus->server_url = "mail.sugarcrm.com";
     $focus->protocol = "imap";
     $focus->mailbox = "INBOX";
     $focus->port = "143";
     $optimum = $focus->findOptimumSettings($useSsl);
     $focus->service = $optimum['serial'];
     $focus->is_personal = 1;
     $focus->status = "Active";
     $focus->mailbox_type = 'pick';
     $focus->group_id = $current_user->id;
     $teamId = User::getPrivateTeam($current_user->id);
     $focus->team_id = $teamId;
     $focus->team_set_id = $focus->getTeamSetIdForTeams($teamId);
     $focus->stored_options = base64_encode(serialize($stored_options));
     $inbound_account_id = $focus->save();
 }
開發者ID:delkyd,項目名稱:sugarcrm_dev,代碼行數:33,代碼來源:InboundEmailTest.php


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