这是mail.php页
<?php
/**文事名
*著者
*2008/01/23 に創建します
*歴史の記録
*機能 ユ-ザ-登録
*/?>
<?php
//移しconfig.inc.php公文書を配置
include_once("../config.inc.php");
//移しcommonファイラ-のdb.inc.php
include_once("../common/db.inc.php");
//頭の公文書を移します/
include_once("../include/header.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<title>むかえて試網に試験します</title>
<!--JS 公文書を移して校合をします-->
<script type="text/javascript" src="../js/js.php">
</script>
<!--css 公文書を移します-->
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
color: #990000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<center>
<form name="form1" method="post">
<table width="599" border="1">
<tr>
<th scope="row">人のアドレス出:</th>
<td><input type="text" name="from" /></td>
</tr>
<tr>
<th scope="row">宛て所:</th>
<td><input type="text" name="to" /></td>
</tr>
<tr>
<th scope="row">タイトル</th>
<td><input type="text" name="subject" /></td>
</tr>
<tr>
<th scope="row">内容配り:</th>
<td><textarea rows=10 name="message"></textarea></td>
</tr>
</table>
<input type="button" name="コミット" value="コミット" onClick="check1()">
<input type="button" name="return" onClick="history.back()" value="戻る">
</form>
</center>
<!--終わりの公文書を移します-->
<?php
include_once ("../include/footer.php")
?>
</body>
</html>
这是finishmail.php页
<?php
include_once("../config.inc.php");
?>
<?php
if(mail($_POST[to],$_POST[subject],$_POST[message],"From:$_POST[from]"))
{
echo "郵便物が発信して成功します!";
}
else
{
echo "郵便物は失敗を発信します!";
}
?>
但发送邮件老报错
Warning: mail() [function.mail]: SMTP server response: 503 valid RCPT command must precede DATA in D:\xampp\htdocs\testing\mail\finishmail.php on line 5郵便物は失敗を発信します!
<?php
/**文事名
*著者
*2008/01/23 に創建します
*歴史の記録
*機能 ユ-ザ-登録
*/?>
<?php
//移しconfig.inc.php公文書を配置
include_once("../config.inc.php");
//移しcommonファイラ-のdb.inc.php
include_once("../common/db.inc.php");
//頭の公文書を移します/
include_once("../include/header.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<title>むかえて試網に試験します</title>
<!--JS 公文書を移して校合をします-->
<script type="text/javascript" src="../js/js.php">
</script>
<!--css 公文書を移します-->
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
color: #990000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<center>
<form name="form1" method="post">
<table width="599" border="1">
<tr>
<th scope="row">人のアドレス出:</th>
<td><input type="text" name="from" /></td>
</tr>
<tr>
<th scope="row">宛て所:</th>
<td><input type="text" name="to" /></td>
</tr>
<tr>
<th scope="row">タイトル</th>
<td><input type="text" name="subject" /></td>
</tr>
<tr>
<th scope="row">内容配り:</th>
<td><textarea rows=10 name="message"></textarea></td>
</tr>
</table>
<input type="button" name="コミット" value="コミット" onClick="check1()">
<input type="button" name="return" onClick="history.back()" value="戻る">
</form>
</center>
<!--終わりの公文書を移します-->
<?php
include_once ("../include/footer.php")
?>
</body>
</html>
这是finishmail.php页
<?php
include_once("../config.inc.php");
?>
<?php
if(mail($_POST[to],$_POST[subject],$_POST[message],"From:$_POST[from]"))
{
echo "郵便物が発信して成功します!";
}
else
{
echo "郵便物は失敗を発信します!";
}
?>
但发送邮件老报错
Warning: mail() [function.mail]: SMTP server response: 503 valid RCPT command must precede DATA in D:\xampp\htdocs\testing\mail\finishmail.php on line 5郵便物は失敗を発信します!
解决方案 »
- 关于PHP使用fread读取文件总是会多一个空字符的问题
- 问下作为PHP程序员需要学 ecshop、joomla! 么
- 这个地址s?wd=xxx在apache或IIS中如何设置urlrewrite
- 兄弟姐妹,求一段程序啊
- php页面如何读取asp页面生成的session值,在线等,急、、、、
- 请教,如何不显示php地址栏中传递参数的值
- 在js中,用window.showModalDialog弹出的窗口,如果访问父窗口的值 ,还有,我弹出的窗口中,如何刷新父窗口
- 我想提个很菜的问题?求教了!!!
- install php+mysql+apache on redhat linux 6.1
- 如何只调用已选项中的两项或者三项?请高手帮忙下!
- 关于$store_dir的疑问
- 是不是可以用Fsockopen连接远程SMTP服务器,进行邮件发送,谢谢各位的指点,我都看了好久了????
这是mail.php页
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-jp">
<title> むかえて試網に試験します </title>
<?php
include_once("../config.inc.php"); //调用配置文件
?>
</head>
<body>
<center>
<form name="form1" method="post">
<table width="599" border="1">
<tr>
<th scope="row"> 人のアドレス出: </th>
<td> <input type="text" name="from" /> </td>
</tr>
<tr>
<th scope="row"> 宛て所: </th>
<td> <input type="text" name="to" /> </td>
</tr>
<tr>
<th scope="row"> タイトル </th>
<td> <input type="text" name="subject" /> </td>
</tr>
<tr>
<th scope="row"> 内容配り: </th>
<td> <textarea rows=10 name="message"> </textarea> </td>
</tr>
</table>
<input type="button" name="コミット" value="コミット" onClick="check1()">
<input type="button" name="return" onClick="history.back()" value="戻る">
</form>
</center>
</body>
</html>
---------------------------------------
这是finishmail.php页
<?php
include_once("../config.inc.php"); //调用配置文件
?>
<?php
if(mail($_POST[to],$_POST[subject],$_POST[message],"From:$_POST[from]"))
{
echo "郵便物が発信して成功します!";
}
else
{
echo "郵便物は失敗を発信します!";
}
?>
---------------------------
报错信息
Warning: mail() [function.mail]: SMTP server response: 503 valid RCPT command must precede DATA in D:\xampp\htdocs\testing\mail\finishmail.php on line 5郵便物は失敗を発信します! 请高手看看到底怎么回事,谢谢!!!