本文整理汇总了PHP中email::add_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP email::add_filter方法的具体用法?PHP email::add_filter怎么用?PHP email::add_filter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类email
的用法示例。
在下文中一共展示了email::add_filter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addslashes
<input type="hidden" name="link_back" value="<?php
echo $link_back;
?>
" />
<input type="hidden" name="account_id" value="<?php
echo $account['id'];
?>
" />
<?php
if ($account) {
if ($mail->open($account['host'], $account['type'], $account['port'], $account['username'], $GO_CRYPTO->decrypt($account['password']), $mailbox, 0, $account['use_ssl'], $account['novalidate_cert'])) {
//block email to spam folder
if (isset($_REQUEST['spam_uid']) && $_REQUEST['spam_uid'] > 0) {
$spam_folder = $account['spam'];
if ($_REQUEST['spam_address'] != '' && $spam_folder != '') {
$email->add_filter($account['id'], "sender", smart_addslashes($_REQUEST['spam_address']), addslashes($spam_folder));
$messages[] = $_REQUEST['spam_uid'];
$mail->move($spam_folder, $messages);
}
}
} else {
echo '<p class="Error">' . $ml_connect_failed . ' \'' . $account['host'] . '\' ' . $ml_at_port . ': ' . $account['port'] . '</p>';
echo '<p class="Error">' . imap_last_error() . '</p>';
require $GO_THEME->theme_path . 'footer.inc';
exit;
}
require "navigation.inc";
} else {
echo '<br /><h3>' . $ml_no_accounts . '</h3><p class="normal">' . $ml_text . '</p>';
}
echo '</form>';
示例2: or
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
*/
require "../../Group-Office.php";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('squirrelmail');
require $GO_MODULES->class_path . "email.class.inc";
require $GO_LANGUAGE->get_language_file('squirrelmail');
$email = new email();
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : 0;
$return_to = isset($_REQUEST['return_to']) && $_REQUEST['return_to'] != '' ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
if ($task == 'save_filter') {
if ($_POST['keyword'] != "" && $_POST['folder'] != "") {
if ($email->add_filter($id, smart_addslashes($_POST['field']), smart_addslashes($_POST['keyword']), smart_addslashes($_POST['folder']))) {
header('Location: ' . $return_to);
exit;
} else {
$feedback = '<p class="Error">' . $strSaveError . '</p>';
}
} else {
$feedback = '<p class="Error">' . $error_missing_field . '</p>';
}
}
require $GO_THEME->theme_path . "header.inc";
$tabtable = new tabtable('filters_list', $ml_filters, '600', '300', '100', '', true);
$tabtable->print_head();
?>
<form method="POST" action="<?php
echo $_SERVER['PHP_SELF'];