📄 sendmail.php
字号:
<?
require("userdata/style.php");
require("global.php");
$add_title=" > 邮件发送";
require("header.php");echo"$headertp";
headguide('你现在正在论坛的邮件程式中','发送邮件','','no');
?>
<br>
<table width="<? echo $tablewidth; ?>" align=center border="0" cellspacing="0" cellpadding="0" bgcolor="<? echo $bordercolor; ?>">
<tr>
<td>
<?
if ($login_status==0) print_err();
if (strpos($target,"/")!==false) die;
if ($target && file_exists("$userpath/$target.php")) {
$usertemp=readfromfile("$userpath/$target.php");
$userdetail=explode("|",$usertemp);
$usermail=$userdetail[4];
$receiver=$userdetail[1];
}
else {
$usermail=$admin_email;
$receiver=$manager;
}
if (!empty($action) && $action=="send") {
if (empty($emailcontent) || strlen($emailcontent)<=20) {
$action="fail";
$status="请填写邮件内容并在10个汉字以上";
}
}
if (empty($action) || $action=="fail") {
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor=<?=$titlecolor?>><font class=title> 给<?=$receiver?>发信 <font color="red"><? if ($status) echo $status; ?></font></font></td>
</tr><form action="sendmail.php" method=post>
<tr bgcolor=<?=$article_color1?>>
<td>邮件标题:
<input value="<? if ($title) echo $title; ?>" type="text" name="title" size="40" maxlength="80" style="background-color:#FEFEFF; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"> 内容:
</td>
</tr>
<tr bgcolor=<?=$article_color2?>>
<td></td>
</tr>
<tr align="center" bgcolor=<?=$article_color1?>>
<td>
<textarea name="emailcontent" rows=10 wrap=hard cols=58 style="background-color:#FEFEFF; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#f3f3f3'" onMouseOut = "this.style.backgroundColor = ''"><? if ($emailcontent) echo $emailcontent; ?></textarea>
</td>
</tr>
<tr>
<td bgcolor=<?=$titlecolor?> align="center">
<input type="submit" value="提 交" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input type="reset" value="重 写" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
<input type="hidden" value="send" name="action">
<input type="hidden" value="<? if (isset($target)) echo $target; ?>" name="target">
</td>
</tr></form>
</table>
<?
}
if (!empty($action) && $action=="send") {
$temp=get_user_info($username);
$email=$temp[4];
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor=<?=$titlecolor?>><font color=<?=$titlefontcolor?>>
发送中</font>
</td></tr>
<tr bgcolor=<?=$article_color2?>>
<td>
<br>
正在连接........<br>
<?
if (mail("$usermail","$title","$emailcontent","From: $email\nReply-To:$email\nX-Mailer: 论坛邮件快递")) echo "发送成功";
else echo "发送失败";
?><br></td>
</tr>
<tr>
<td bgcolor=<?=$titlecolor?>>
<div align="center">
<input type="button" onclick="javascript:history.go(-1);" value="返 回" style="height:20px;background-color:#f3f3f3;border:1 solid black" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" name="button2">
</div>
</td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
<? require("footer.php");echo"$footertp";
function print_err() {
global $subcolor,$titlecolor,$article_color2,$titlefontcolor;
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr bgcolor=<?=$titlecolor?>>
<td bgcolor=<?=$titlecolor?>><font color=<?=$titlefontcolor?>>
邮件程式发生错误</font>
</td></tr>
<tr bgcolor=<?=$article_color2?>>
<td>
<br>
发生错误,您还没有登录:
<ul>
<li><a href=javascript:history.go(-1);">返回前页</a>
<li><a href=login.php>现在登录</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table><br>
<center>
<?
require("footer.php");echo"$footertp";
exit;
}
?>
</center>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -