本文整理匯總了PHP中InboundEmail::getCorrectMessageNoForPop3方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::getCorrectMessageNoForPop3方法的具體用法?PHP InboundEmail::getCorrectMessageNoForPop3怎麽用?PHP InboundEmail::getCorrectMessageNoForPop3使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InboundEmail
的用法示例。
在下文中一共展示了InboundEmail::getCorrectMessageNoForPop3方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doAssignment
function doAssignment($distributeMethod, $ieid, $folder, $uids, $users)
{
global $app_strings;
$users = explode(",", $users);
$emailIds = explode($app_strings['LBL_EMAIL_DELIMITER'], $uids);
$out = "";
if ($folder != 'sugar::Emails') {
$emailIds = array();
$uids = explode($app_strings['LBL_EMAIL_DELIMITER'], $uids);
$ie = new InboundEmail();
$ie->retrieve($ieid);
$messageIndex = 1;
// dealing with an inbound email data so we need to import an email and then
foreach ($uids as $uid) {
$ie->mailbox = $folder;
$ie->connectMailserver();
$msgNo = $uid;
if (!$ie->isPop3Protocol()) {
$msgNo = imap_msgno($ie->conn, $uid);
} else {
$msgNo = $ie->getCorrectMessageNoForPop3($uid);
}
if (!empty($msgNo)) {
if ($ie->importOneEmail($msgNo, $uid)) {
$emailIds[] = $ie->email->id;
$ie->deleteMessageOnMailServer($uid);
//$ie->retrieve($ieid);
//$ie->connectMailserver();
$ie->mailbox = $folder;
$ie->deleteMessageFromCache($uids[] = $uid);
} else {
$out = $out . "Message No : " . $messageIndex . " failed. Reason : Message already imported \r\n";
}
}
$messageIndex++;
}
// for
}
// if
if (count($emailIds) > 0) {
$this->doDistributionWithMethod($users, $emailIds, $distributeMethod);
}
// if
return $out;
}
示例2: getCorrectMessageNoForPop3
public function getCorrectMessageNoForPop3($id)
{
$inboundEmail = new InboundEmail();
$inboundEmail->retrieve($id);
$result = $inboundEmail->getCorrectMessageNoForPop3('100');
$this->assertEquals(-1, $result);
$result = $inboundEmail->getCorrectMessageNoForPop3('1');
$this->assertEquals(-1, $result);
}