本文整理匯總了PHP中InboundEmail::savePersonalEmailAccount方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::savePersonalEmailAccount方法的具體用法?PHP InboundEmail::savePersonalEmailAccount怎麽用?PHP InboundEmail::savePersonalEmailAccount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InboundEmail
的用法示例。
在下文中一共展示了InboundEmail::savePersonalEmailAccount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: InboundEmail
//User is alloweed to clear username and pass so no need to check for blanks.
$userOverrideOE->mail_smtpuser = $_REQUEST['mail_smtpuser'];
$userOverrideOE->mail_smtppass = $_REQUEST['mail_smtppass'];
$userOverrideOE->save();
} else {
//If a user name and password for the mail account is set, create the users override account.
if (!(empty($_REQUEST['mail_smtpuser']) || empty($_REQUEST['mail_smtppass']))) {
$sysOutboundAccunt->createUserSystemOverrideAccount($focus->id, $_REQUEST['mail_smtpuser'], $_REQUEST['mail_smtppass']);
}
}
}
///////////////////////////////////////////////////////////////////////////
//// INBOUND EMAIL SAVES
if (isset($_REQUEST['server_url']) && !empty($_REQUEST['server_url'])) {
$ie = new InboundEmail();
if (false === $ie->savePersonalEmailAccount($return_id, $focus->user_name)) {
header("Location: index.php?action=Error&module=Users&error_string=&ie_error=true&id=" . $return_id);
die;
// die here, else the header redirect below takes over.
}
} elseif (isset($_REQUEST['ie_id']) && !empty($_REQUEST['ie_id']) && empty($_REQUEST['server_url'])) {
// user is deleting their I-E
$ie = new InboundEmail();
$ie->deletePersonalEmailAccount($_REQUEST['ie_id'], $focus->user_name);
}
//// END INBOUND EMAIL SAVES
///////////////////////////////////////////////////////////////////////////
if ($newUser && !$focus->is_group && !$focus->portal_only && isset($sugar_config['passwordsetting']['SystemGeneratedPasswordON']) && $sugar_config['passwordsetting']['SystemGeneratedPasswordON']) {
$new_pwd = '2';
require_once 'modules/Users/GeneratePassword.php';
}
示例2: testsavePersonalEmailAccountAndOthers
public function testsavePersonalEmailAccountAndOthers()
{
$inboundEmail = new InboundEmail();
$_REQUEST['ie_name'] = 'test';
$_REQUEST['ie_status'] = 'Active';
$_REQUEST['server_url'] = '';
$_REQUEST['email_user'] = 'test';
$_REQUEST['email_password'] = 'test_pass';
$_REQUEST['mailbox'] = 'INBOX';
$result = $inboundEmail->savePersonalEmailAccount(1, 'admin', true);
$this->assertTrue(isset($inboundEmail->id));
$this->assertEquals(36, strlen($inboundEmail->id));
//test handleIsPersonal method
$this->handleIsPersonal($inboundEmail->id);
//test getUserPersonalAccountCount method
$this->getUserPersonalAccountCount();
//test retrieveByGroupFolderId method
$this->retrieveByGroupFolderId();
//test getUserNameFromGroupId method
$this->getUserNameFromGroupId($inboundEmail->id);
//test deletePersonalEmailAccount method
$this->deletePersonalEmailAccount($inboundEmail->id);
}