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


PHP Support::sendEmailFromPost方法代码示例

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


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

示例1: isset

$issue_id = isset($_GET['issue_id']) ? (int) $_GET['issue_id'] : (isset($_POST['issue_id']) ? (int) $_POST['issue_id'] : null);
$cat = isset($_POST['cat']) ? (string) $_POST['cat'] : (isset($_GET['cat']) ? (string) $_GET['cat'] : null);
$tpl->assign('issue_id', $issue_id);
if (!Issue::canAccess($issue_id, $usr_id)) {
    $tpl->setTemplate('permission_denied.tpl.html');
    $tpl->displayTemplate();
    exit;
}
Workflow::prePage($prj_id, 'send_email');
// since emails associated with issues are sent to the notification list, not the to: field, set the to field to be blank
// this field should already be blank, but may also be unset.
if ($issue_id) {
    $_POST['to'] = '';
}
if ($cat == 'send_email') {
    $res = Support::sendEmailFromPost($_POST['parent_id']);
    $tpl->assign('send_result', $res);
    if (Access::canChangeStatus($issue_id, $usr_id) && isset($_POST['new_status']) && !empty($_POST['new_status'])) {
        $res = Issue::setStatus($issue_id, $_POST['new_status']);
        if ($res != -1) {
            $new_status = Status::getStatusTitle($_POST['new_status']);
            History::add($issue_id, $usr_id, 'status_changed', "Status changed to '{status}' by {user} when sending an email", array('status' => $new_status, 'user' => User::getFullName($usr_id)));
        }
    }
    // remove the existing email draft, if appropriate
    if (!empty($_POST['draft_id'])) {
        Draft::remove($_POST['draft_id']);
    }
    // enter the time tracking entry about this new email
    if (!empty($_POST['time_spent'])) {
        $date = (array) $_POST['date'];
开发者ID:korusdipl,项目名称:eventum,代码行数:31,代码来源:send.php

示例2: send

 /**
  * Converts an email to a draft and sends it.
  *
  * @param   integer $draft_id The id of the draft to send.
  * @return int
  */
 public static function send($draft_id)
 {
     $draft = self::getDetails($draft_id);
     $_POST['issue_id'] = $draft['emd_iss_id'];
     $_POST['subject'] = $draft['emd_subject'];
     $_POST['from'] = User::getFromHeader(Auth::getUserID());
     $_POST['to'] = $draft['to'];
     $_POST['cc'] = @implode(';', $draft['cc']);
     $_POST['message'] = $draft['emd_body'];
     $_POST['ema_id'] = Email_Account::getEmailAccount();
     $res = Support::sendEmailFromPost();
     if ($res == 1) {
         self::remove($draft_id);
     }
     return $res;
 }
开发者ID:korusdipl,项目名称:eventum,代码行数:22,代码来源:class.draft.php


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