function sendmail($recive,$title,$content,$memo){
if (mail($recive,$title,$content,$memo)){
return true;
}else{
return false;
}
}$content="<html><body><iframe  frameborder=\"1\"  name=\"isread\" src=\"http://www.visit.com/mailsys/mail/try_test.php\"></iframe></body></html>";
sendmail("[email protected]","try",$content,"MIME-Version: 1.0\nContent-type: text/html; charset=gb2312\nFrom: [email protected]\n");

解决方案 »

  1.   

    这是我的接收内容
    Return-Path: <[email protected]>
    Received: from localhost.localdomain (unknown [218.58.166.4])
    by  (Postfix) with ESMTP id 357EDCA7
    ; Wed, 11 Jun 2003 17:36:02 +0800 (CST)
    Received: (from nobody@localhost)
    by localhost.localdomain (8.11.6/8.11.6) id h5BAZKk08845;
    Wed, 11 Jun 2003 18:35:20 +0800
    Date: Wed, 11 Jun 2003 18:35:20 +0800
    Message-Id: <[email protected]>
    To: 
    Subject: try
    MIME-Version: 1.0
    Content-type: text/html; charset=gb2312
    From: [email protected]
    <html><body><iframe  frameborder="1"  name="isread" src="http://www.visit.com/mailsys/mail/try_test.php"></iframe></body></html>
      

  2.   

    对,接收的邮件的主体的源代码为
    <html><body><iframe  frameborder="1"  name="isread" src="http://www.visit.com/mailsys/mail/try_test.php"></iframe></body></html>
    try_test.php(测试时)内容如下:
    <?
     echo "abcdefg";
     echo "<br>";
     exit;
    ?>但是在查看邮件时并没有abcdefg的内容,用浏览器浏览就有预期效果。
    其实程序原意是:
    在接收者查看邮件的时候到数据库中记录该文件已读,记录阅读时间等,于是在发送的内容中用iframe使try_test.php文件完成这些操作。但总是没有达到预期效果,邮件中只有框架,并没有执行php文件。