本文整理汇总了PHP中SugarEmailAddress::AddUpdateEmailAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarEmailAddress::AddUpdateEmailAddress方法的具体用法?PHP SugarEmailAddress::AddUpdateEmailAddress怎么用?PHP SugarEmailAddress::AddUpdateEmailAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarEmailAddress
的用法示例。
在下文中一共展示了SugarEmailAddress::AddUpdateEmailAddress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: markEmailAddressInvalid
/**
* Given an email address, mark it as invalid.
*
* @param $email_address
*/
function markEmailAddressInvalid($email_address)
{
if (empty($email_address)) {
return;
}
$sea = new SugarEmailAddress();
$rs = $sea->retrieve_by_string_fields(array('email_address_caps' => trim(strtoupper($email_address))));
if ($rs != null) {
$sea->AddUpdateEmailAddress($email_address, 1, 0, $rs->id);
}
}
示例2: SugarEmailAddress
$lead->campaigns->add($camplog->id);
if (!empty($GLOBALS['check_notify'])) {
$lead->save($GLOBALS['check_notify']);
} else {
$lead->save(FALSE);
}
}
//in case there are forms out there still using email_opt_out
if (isset($_POST['webtolead_email_opt_out']) || isset($_POST['email_opt_out'])) {
if (isset($lead->email1) && !empty($lead->email1)) {
$sea = new SugarEmailAddress();
$sea->AddUpdateEmailAddress($lead->email1, 0, 1);
}
if (isset($lead->email2) && !empty($lead->email2)) {
$sea = new SugarEmailAddress();
$sea->AddUpdateEmailAddress($lead->email2, 0, 1);
}
}
if (isset($_POST['redirect_url']) && !empty($_POST['redirect_url'])) {
// Get the redirect url, and make sure the query string is not too long
$redirect_url = $_POST['redirect_url'];
$query_string = '';
$first_char = '&';
if (strpos($redirect_url, '?') === FALSE) {
$first_char = '?';
}
$first_iteration = true;
$get_and_post = array_merge($_GET, $_POST);
foreach ($get_and_post as $param => $value) {
if ($param == 'redirect_url' || $param == 'submit') {
continue;
示例3: SugarEmailAddress
if (!empty($GLOBALS['check_notify'])) {
$person->save($GLOBALS['check_notify']);
} else {
$person->save(false);
}
}
//in case there are forms out there still using email_opt_out
if (isset($_POST['webtolead_email_opt_out']) || isset($_POST['email_opt_out'])) {
if (isset($person->email1) && !empty($person->email1)) {
$sea = new SugarEmailAddress();
$sea->AddUpdateEmailAddress($person->email1, 0, 1);
}
if (isset($person->email2) && !empty($person->email2)) {
$sea = new SugarEmailAddress();
$sea->AddUpdateEmailAddress($person->email2, 0, 1);
}
}
if (isset($_POST['redirect_url']) && !empty($_POST['redirect_url'])) {
// Get the redirect url, and make sure the query string is not too long
$redirect_url = $_POST['redirect_url'];
$query_string = '';
$first_char = '&';
if (strpos($redirect_url, '?') === false) {
$first_char = '?';
}
$first_iteration = true;
$get_and_post = array_merge($_GET, $_POST);
foreach ($get_and_post as $param => $value) {
if ($param == 'redirect_url' && $param == 'submit') {
continue;