本文整理汇总了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?
}
}