提交表单到"sendmail.php" (form action属性)。而各项input控件的name值必须要有,例如 <input name="qq" type="text" />
sendmail.php中获取表单值用$_POST超级变量(php初始化时自动为其赋值),比如获取填写的QQ用$_POST['qq']即可。
$smtpemailto发件人这项应该是QQ号加上"@qq.com",那么就写成 
if(isset($POST['qq'])){
    $smtpemailto = $_POST['qq'] . "@qq.com"; // . 为字符串连接符,相当于Js的+
} else {
    exit("出错,提交的表单没有修改好name属性,终止程序");
}

解决方案 »

  1.   


    action="sendmail.php"sendmail.php
    还要根据提交的用户信息去数据库中取用户的邮箱
      

  2.   


    提交表单到sendmail.php后,系统报错:Parse error: syntax error, unexpected '"' in F:\dedecms\APMServ5.2.6\www\htdocs\plus\email.class.php on line 236
    我看了下第236行,代码是:if (log_file">!@file_exists($this->log_file) || !($fp = @fopen($this->log_file, "a"))) {请问怎么解决?
      

  3.   

    if (log_file">!@file_exists($this->log_file) || !($fp = @fopen($this->log_file, "a"))) {應該是
    if ("log_file">!@file_exists($this->log_file) || !($fp = @fopen($this->log_file, "a"))) {
    錯誤就是報的語法錯誤啊   你自己查看下  是不是這樣的啊?