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


PHP email_send_all函数代码示例

本文整理汇总了PHP中email_send_all函数的典型用法代码示例。如果您正苦于以下问题:PHP email_send_all函数的具体用法?PHP email_send_all怎么用?PHP email_send_all使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了email_send_all函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

/**
 * Mantis Core API's
 */
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core.php';
access_ensure_global_level(config_get_global('admin_site_threshold'));
html_page_top();
$f_to = gpc_get('send', null);
if ($f_to !== null) {
    if ($f_to == 'all') {
        echo "Sending emails...<br />";
        email_send_all();
        echo "Done";
    } else {
        if ($f_to == 'sendordelall') {
            echo "Sending or deleting emails...<br />";
            email_send_all(true);
            echo "Done";
        } else {
            $t_email_data = email_queue_get((int) $f_to);
            // check if email was found.  This can fail if another request picks up the email first and sends it.
            echo 'Sending email...<br />';
            if ($t_email_data !== false) {
                if (!email_send($t_email_data)) {
                    echo 'Email Not Sent - Deleting from queue<br />';
                    email_queue_delete($t_email_data->email_id);
                } else {
                    echo 'Email Sent<br />';
                }
            } else {
                echo 'Email not found in queue<br />';
            }
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:email_queue.php

示例2: Copyright

#!/usr/bin/php -q
<?php 
# MantisBT - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
# Copyright (C) 2002 - 2014  MantisBT Team - mantisbt-dev@lists.sourceforge.net
# MantisBT is free software: you can redistribute it and/or modify
# it 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.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
# See the README and LICENSE files for details
global $g_bypass_headers;
$g_bypass_headers = 1;
require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'core.php';
require_once 'email_api.php';
# Make sure this script doesn't run via the webserver
if (php_sapi_name() != 'cli') {
    echo "send_emails.php is not allowed to run through the webserver.\n";
    exit(1);
}
echo "Sending emails...\n";
email_send_all();
echo "Done.\n";
exit(0);
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:send_emails.php

示例3: log_print_to_page

/**
 * Print logging api output to bottom of html page
 * @return void
 */
function log_print_to_page()
{
    if (config_get_global('log_destination') === 'page' && auth_is_user_authenticated() && access_has_global_level(config_get('show_log_threshold'))) {
        global $g_log_events, $g_log_levels, $g_email_shutdown_processing;
        if ($g_email_shutdown_processing) {
            email_send_all();
        }
        $t_unique_queries_count = 0;
        $t_total_query_execution_time = 0;
        $t_unique_queries = array();
        $t_total_queries_count = 0;
        $t_total_event_count = count($g_log_events);
        echo "\t<hr />\n";
        echo "\n\n<!--Mantis Debug Log Output-->";
        if ($t_total_event_count == 0) {
            echo "<!--END Mantis Debug Log Output-->\n\n";
            return;
        }
        echo "<hr />\n";
        echo "<table id=\"log-event-list\">\n";
        echo "\t<thead>\n";
        echo "\t\t<tr>\n";
        echo "\t\t\t<th>" . lang_get('log_page_number') . "</th>\n";
        echo "\t\t\t<th>" . lang_get('log_page_time') . "</th>\n";
        echo "\t\t\t<th>" . lang_get('log_page_caller') . "</th>\n";
        echo "\t\t\t<th>" . lang_get('log_page_event') . "</th>\n";
        echo "\t\t</tr>\n";
        echo "\t</thead>\n";
        echo "\t<tbody>\n";
        for ($i = 0; $i < $t_total_event_count; $i++) {
            if ($g_log_events[$i][1] == LOG_DATABASE) {
                if (!in_array($g_log_events[$i][2][0], $t_unique_queries)) {
                    $t_unique_queries_count++;
                    $g_log_events[$i][2][2] = false;
                    array_push($t_unique_queries, $g_log_events[$i][2][0]);
                } else {
                    $g_log_events[$i][2][2] = true;
                }
                $t_total_query_execution_time += $g_log_events[$i][2][1];
            }
        }
        $t_count = array();
        foreach ($g_log_events as $t_log_event) {
            $t_level = $g_log_levels[$t_log_event[1]];
            if (isset($t_count[$t_log_event[1]])) {
                $t_count[$t_log_event[1]]++;
            } else {
                $t_count[$t_log_event[1]] = 1;
            }
            switch ($t_log_event[1]) {
                case LOG_DATABASE:
                    $t_total_queries_count++;
                    $t_query_duplicate_class = '';
                    if ($t_log_event[2][2]) {
                        $t_query_duplicate_class = ' class="duplicate-query"';
                    }
                    echo "\t\t<tr " . $t_query_duplicate_class . '><td>' . $t_level . '-' . $t_count[$t_log_event[1]] . '</td><td>' . $t_log_event[2][1] . '</td><td>' . string_html_specialchars($t_log_event[3]) . '</td><td>' . string_html_specialchars($t_log_event[2][0]) . "</td></tr>\n";
                    break;
                default:
                    echo "\t\t<tr><td>" . $t_level . '-' . $t_count[$t_log_event[1]] . '</td><td>' . $t_log_event[2][1] . '</td><td>' . string_html_specialchars($t_log_event[3]) . '</td><td>' . string_html_specialchars($t_log_event[2][0]) . "</td></tr>\n";
            }
        }
        # output any summary data
        if ($t_unique_queries_count != 0) {
            $t_unique_queries_executed = sprintf(lang_get('unique_queries_executed'), $t_unique_queries_count);
            echo "\t\t<tr><td>" . $g_log_levels[LOG_DATABASE] . '</td><td colspan="3">' . $t_unique_queries_executed . "</td></tr>\n";
        }
        if ($t_total_queries_count != 0) {
            $t_total_queries_executed = sprintf(lang_get('total_queries_executed'), $t_total_queries_count);
            echo "\t\t<tr><td>" . $g_log_levels[LOG_DATABASE] . '</td><td colspan="3">' . $t_total_queries_executed . "</td></tr>\n";
        }
        if ($t_total_query_execution_time != 0) {
            $t_total_query_time = sprintf(lang_get('total_query_execution_time'), $t_total_query_execution_time);
            echo "\t\t<tr><td>" . $g_log_levels[LOG_DATABASE] . '</td><td colspan="3">' . $t_total_query_time . "</td></tr>\n";
        }
        echo "\t</tbody>\n\t</table>\n";
        echo "<!--END Mantis Debug Log Output-->\n\n";
    }
}
开发者ID:sfranks1124,项目名称:mantisbt,代码行数:83,代码来源:logging_api.php

示例4: html_end

/**
 * (15) Print the closing <html> tag
 * @return void
 */
function html_end()
{
    global $g_email_stored;
    echo '</html>', "\n";
    if ($g_email_stored == true) {
        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }
        email_send_all();
    }
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:15,代码来源:html_api.php

示例5: email_shutdown_function

/**
 * The email sending shutdown function
 * Will send any queued emails, except when $g_email_send_using_cronjob = ON.
 * If $g_email_shutdown_processing EMAIL_SHUTDOWN_FORCE flag is set, emails
 * will be sent regardless of cronjob setting.
 * @return void
 */
function email_shutdown_function()
{
    global $g_email_shutdown_processing;
    # Nothing to do if
    # - no emails have been generated in the current request
    # - system is configured to use cron job (unless processing is forced)
    if ($g_email_shutdown_processing == EMAIL_SHUTDOWN_SKIP || !($g_email_shutdown_processing & EMAIL_SHUTDOWN_FORCE) && config_get('email_send_using_cronjob')) {
        return;
    }
    $t_msg = 'Shutdown function called for ' . $_SERVER['SCRIPT_NAME'];
    if ($g_email_shutdown_processing & EMAIL_SHUTDOWN_FORCE) {
        $t_msg .= ' (email processing forced)';
    }
    log_event(LOG_EMAIL_VERBOSE, $t_msg);
    if ($g_email_shutdown_processing) {
        email_send_all();
    }
}
开发者ID:sfranks1124,项目名称:mantisbt,代码行数:25,代码来源:email_api.php

示例6: email_group_reminder

function email_group_reminder($p_user_id, $issues)
{
    $t_username = user_get_field($p_user_id, 'username');
    $t_email = user_get_email($p_user_id);
    $t_subject = config_get('plugin_Reminder_reminder_group_subject');
    $t_message = $issues;
    if (!is_blank($t_email)) {
        email_store($t_email, $t_subject, $t_message);
        if (OFF == config_get('email_send_using_cronjob')) {
            email_send_all();
        }
    }
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:13,代码来源:bug_reminder_mail.php


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