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


PHP Support::sendEmail方法代码示例

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


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

示例1:

$prj_id = Auth::getCurrentProject();
$usr_id = Auth::getUserID();
@($issue_id = $HTTP_GET_VARS["issue_id"] ? $HTTP_GET_VARS["issue_id"] : $HTTP_POST_VARS["issue_id"]);
$tpl->assign("issue_id", $issue_id);
if (!Issue::canAccess($issue_id, $usr_id)) {
    $tpl->setTemplate("permission_denied.tpl.html");
    $tpl->displayTemplate();
    exit;
}
// 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 (!empty($issue_id)) {
    $HTTP_POST_VARS['to'] = '';
}
if (@$HTTP_POST_VARS["cat"] == "send_email") {
    $res = Support::sendEmail($HTTP_POST_VARS['parent_id']);
    $tpl->assign("send_result", $res);
    if (!@empty($HTTP_POST_VARS['new_status'])) {
        $res = Issue::setStatus($issue_id, $HTTP_POST_VARS['new_status']);
        Issue::updateControlStatus($issue_id);
        if ($res != -1) {
            $new_status = Status::getStatusTitle($HTTP_POST_VARS['new_status']);
            History::add($issue_id, $usr_id, History::getTypeID('status_changed'), "Status changed to '{$new_status}' by " . User::getFullName($usr_id) . " when sending an email");
        }
    }
    // remove the existing email draft, if appropriate
    if (!empty($HTTP_POST_VARS['draft_id'])) {
        Draft::remove($HTTP_POST_VARS['draft_id']);
    }
    // enter the time tracking entry about this new email
    if (!empty($HTTP_POST_VARS['time_spent'])) {
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:send.php

示例2: send

 /**
  * Converts an email to a draft and sends it.
  *
  * @access  public
  * @param   integer $draft_id The id of the draft to send.
  */
 function send($draft_id)
 {
     global $HTTP_POST_VARS;
     $draft_id = Misc::escapeInteger($draft_id);
     $draft = Draft::getDetails($draft_id);
     $HTTP_POST_VARS["issue_id"] = $draft["emd_iss_id"];
     $HTTP_POST_VARS["subject"] = $draft["emd_subject"];
     $HTTP_POST_VARS["from"] = User::getFromHeader(Auth::getUserID());
     $HTTP_POST_VARS["to"] = $draft["to"];
     $HTTP_POST_VARS["cc"] = @join(";", $draft["cc"]);
     $HTTP_POST_VARS["message"] = $draft["emd_body"];
     $HTTP_POST_VARS["ema_id"] = Email_Account::getEmailAccount();
     $res = Support::sendEmail();
     if ($res == 1) {
         Draft::remove($draft_id);
     }
     return $res;
 }
开发者ID:juliogallardo1326,项目名称:proc,代码行数:24,代码来源:class.draft.php

示例3: send

 /**
  * Converts an draft to and email 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);
     $from = User::getFromHeader(Auth::getUserID());
     $to = $draft['to'];
     $cc = implode(';', $draft['cc']);
     $subject = $draft['emd_subject'];
     $options = array('ema_id' => Email_Account::getEmailAccount());
     $res = Support::sendEmail($draft['emd_iss_id'], null, $from, $to, $cc, $subject, $draft['emd_body'], $options);
     if ($res == 1) {
         self::remove($draft_id);
     }
     return $res;
 }
开发者ID:dabielkabuto,项目名称:eventum,代码行数:20,代码来源:class.draft.php


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