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


PHP InboundEmail::getSessionConnectionString方法代碼示例

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


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

示例1: isset

}
if (!empty($_REQUEST['email_password'])) {
    $focus->email_password = $_REQUEST['email_password'];
}
$focus->protocol = $_REQUEST['protocol'];
if (isset($_REQUEST['is_create_case']) && $_REQUEST['is_create_case'] == 'on') {
    $focus->mailbox_type = 'createcase';
} else {
    if (empty($focus->mailbox_type) || $focus->mailbox_type == 'createcase') {
        $focus->mailbox_type = 'pick';
    }
}
/////////////////////////////////////////////////////////
////	SERVICE STRING CONCATENATION
$useSsl = isset($_REQUEST['ssl']) && $_REQUEST['ssl'] == 1 ? true : false;
$optimum = $focus->getSessionConnectionString($focus->server_url, $focus->email_user, $focus->port, $focus->protocol);
if (empty($optimum)) {
    $optimum = $focus->findOptimumSettings($useSsl, $focus->email_user, $focus->email_password, $focus->server_url, $focus->port, $focus->protocol, $focus->mailbox);
}
// if
$delimiter = $focus->getSessionInboundDelimiterString($focus->server_url, $focus->email_user, $focus->port, $focus->protocol);
//added check to ensure the $optimum['serial']) is not empty.
if (is_array($optimum) && count($optimum) > 0 && !empty($optimum['serial'])) {
    $focus->service = $optimum['serial'];
} else {
    // no save
    // allowing bad save to allow Email Campaigns configuration to continue even without IMAP
    $focus->service = "::::::" . $focus->protocol . "::::";
    // save bogus info.
    $error = "&error=true";
}
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:31,代碼來源:Save.php

示例2: testgetSessionConnectionString

 public function testgetSessionConnectionString()
 {
     $inboundEmail = new InboundEmail();
     //test without setting session key
     $result = $inboundEmail->getSessionConnectionString('mail.google.com', 'test', 22, 'IMAP');
     $this->assertEquals('', $result);
     //test with session key set
     $_SESSION['mail.google.comtest22IMAP'] = 'test connection string';
     $result = $inboundEmail->getSessionConnectionString('mail.google.com', 'test', 22, 'IMAP');
     $this->assertEquals('test connection string', $result);
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:11,代碼來源:InboundEmailTest.php


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