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


PHP NotificationMail::ClearAddresses方法代码示例

本文整理汇总了PHP中NotificationMail::ClearAddresses方法的典型用法代码示例。如果您正苦于以下问题:PHP NotificationMail::ClearAddresses方法的具体用法?PHP NotificationMail::ClearAddresses怎么用?PHP NotificationMail::ClearAddresses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NotificationMail的用法示例。


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

示例1: send

 static function send($mailing_options)
 {
     $mail = new NotificationMail();
     $mail->sendNotification($mailing_options);
     $mail->ClearAddresses();
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:6,代码来源:notification.class.php

示例2: time

            $mmail->FromName = $row['email'];
        }
    }
    $body = str_replace("\\r", "", str_replace("\\n", "\n", $_POST['body']));
    if ($_POST['users_id_ticketmail']) {
        $address = PluginTicketmailProfile::getEmail($_POST['users_id_ticketmail']);
    } else {
        $address = $_POST["address"];
    }
    if (!NotificationMail::isUserAddressValid($address)) {
        Session::addMessageAfterRedirect(__("Invalid email address"), false, ERROR);
    }
    $mmail->AddAddress($address, $address);
    $mmail->Subject = $_POST["subject"];
    $mmail->Body = $body;
    $mmail->MessageID = "GLPI-ticketmail" . time() . "." . rand() . "@" . php_uname('n');
    if (!$mmail->Send()) {
        Session::addMessageAfterRedirect(__("Your email could not be processed.\nIf the problem persists, contact the administrator"), false, ERROR);
    } else {
        Toolbox::logInFile("mail", sprintf(__('%1$s: %2$s'), sprintf(__('An email was sent to %s'), $address), $_POST["subject"] . "\n"));
        $changes[0] = 0;
        $changes[1] = $address;
        $changes[2] = $_POST['subject'];
        Log::history($_POST['id'], 'Ticket', $changes, 'PluginTicketmailProfile', Log::HISTORY_PLUGIN + 1024);
        Session::addMessageAfterRedirect(sprintf(__('An email was sent to %s'), $address));
    }
    $mmail->ClearAddresses();
    Html::redirect($_SERVER['HTTP_REFERER']);
} else {
    Html::redirect("../index.php");
}
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:ticketmail.form.php


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