本文整理匯總了PHP中set_bounce_count函數的典型用法代碼示例。如果您正苦於以下問題:PHP set_bounce_count函數的具體用法?PHP set_bounce_count怎麽用?PHP set_bounce_count使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了set_bounce_count函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: useredit_update_bounces
function useredit_update_bounces($user, $usernew) {
if (!isset($usernew->email)) {
//locked field
return;
}
if (!isset($user->email) || $user->email !== $usernew->email) {
set_bounce_count($usernew,true);
set_send_count($usernew,true);
}
}
示例2: moodle_process_email
/**
* ?
*
* @todo Finish documenting this function
*
* @param string $modargs
* @param string $body Currently unused
*/
function moodle_process_email($modargs, $body)
{
global $DB;
// The first char should be an unencoded letter. We'll take this as an action.
switch ($modargs[0]) {
case 'B':
// Bounce.
list(, $userid) = unpack('V', base64_decode(substr($modargs, 1, 8)));
if ($user = $DB->get_record("user", array('id' => $userid), "id,email")) {
// Check the half md5 of their email.
$md5check = substr(md5($user->email), 0, 16);
if ($md5check == substr($modargs, -16)) {
set_bounce_count($user);
}
// Else maybe they've already changed it?
}
break;
// Maybe more later?
}
}
示例3: moodle_process_email
function moodle_process_email($modargs, $body)
{
// the first char should be an unencoded letter. We'll take this as an action
switch ($modargs[0]) {
case 'B':
// bounce
list(, $userid) = unpack('V', base64_decode(substr($modargs, 1, 8)));
if ($user = get_record_select("user", "id={$userid}", "id,email")) {
// check the half md5 of their email
$md5check = substr(md5($user->email), 0, 16);
if ($md5check == substr($modargs, -16)) {
set_bounce_count($user);
}
// else maybe they've already changed it?
}
break;
// maybe more later?
}
}