当前位置: 首页>>代码示例>>PHP>>正文


PHP email::add_filter方法代码示例

本文整理汇总了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>';
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:index.php

示例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'];
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:filter.php


注:本文中的email::add_filter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。