示例#1
0
}
$filename = "mail/" . strtoupper($currentuser["userid"][0]) . "/" . $currentuser["userid"] . "/" . $file;
if (!file_exists($filename)) {
    html_error_quit("信件不存在...");
}
mailbox_header("转寄信件");
if (isset($_POST["target"])) {
    $target = $_POST["target"];
} else {
    $target = "";
}
if ($target == "") {
    html_error_quit("请指定对象");
}
if (isset($_POST["big5"])) {
    $big5 = $_POST["big5"];
} else {
    $big5 = 0;
}
settype($big5, "integer");
if (isset($_POST["noansi"])) {
    $noansi = $_POST["noansi"];
} else {
    $noansi = 0;
}
settype($noansi, "integer");
$ret = bbs_domailforward($filename, $articles[0]["TITLE"], $target, $big5, $noansi);
if ($ret < 0) {
    html_error_quit("系统错误: " . $ret);
}
html_success_quit("信件已转寄给 " . htmlspecialchars($target));
示例#2
0
文件: mail.php 项目: tilitala/nForum
 /**
  * function forward mail id this mail to sb.
  *
  * @param string $target
  * @param boolean $noansi
  * @param boolean $big5
  * @return null
  * @access public
  */
 public function forward($target, $noansi = false, $big5 = false)
 {
     $code = null;
     $ret = bbs_domailforward($this->getFileName(), $this->TITLE, $target, $big5, $noansi);
     switch ($ret) {
         case -1:
         case -3:
             $code = ECode::$MAIL_FULL;
             break;
         case -2:
         case -5:
         case -6:
             $code = ECode::$MAIL_NOPERM;
             break;
         case -4:
             $code = ECode::$MAIL_REJECT;
             break;
         case -7:
             $code = ECode::$MAIL_NOMAIL;
             break;
         case -10:
             $code = ECode::$SYS_ERROR;
         case -201:
             $code = ECode::$MAIL_NOID;
             break;
     }
     if (!is_null($code)) {
         throw new MailSendException($code);
     }
 }