首页 > 开发 > PHP > 正文

我的群发邮件程序

2024-05-04 23:01:46
字体:
来源:转载
供稿:网友
<html>
<title> untitled </title>
<?php  
include "connect.inc.php";
if ($subject) {
$query = "select name,email from user";
$res = mysql_query($query);  
$row = mysql_fetch_array($res);  
while ($row) {
mail($row['email'],$subject,$row['name'].":n".$text."n中国广告网,和你共成长。www.guanggaocn.comn","from:".$mailaddress);
$row = mysql_fetch_array($res);  
}
echo "<script language='javascript'>";  
echo "parent.location.href='welcome.php'";
echo "</script>";}
?>
<body>
<p align=center><font face="隶书" size="7" color="#ff0000">群发邮件<br><br></font>
<p align=left><form name="email" action="email.php" method="post">
<font face="华文行楷" size="6" color="#0000ff">邮件主题:<input type=text name="subject" size="50" maxlength="18" value=<?php echo $subject ?>><br><br>
邮件内容:<textarea  name="text" cols="90" rows="3" value="<?php echo $text?>"> </textarea><br><br>
</font>
<input type=submit value=发出邮件></form>
</body>
</html>  


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表