<form name="form1" method="post" action="mailto:你的邮箱地址">

解决方案 »

  1.   

    <form action="mailto:[email protected]" method="post">
      <table width="406" height="189" border="0">
        <tr>
          <td>name</td>
          <td><input type="text" name="guestname"></td>
        </tr>
        <tr>
          <td>mailaddress</td>
          <td><input type="text" name="mailaddress"></td>
        </tr>
        <tr>
          <td height="101">suggestion</td>
          <td><textarea name="suggestion" wrap="PHYSICAL" rows="10" cols="50"></textarea></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td colspan="2"><input type="submit" name="Submit" value="submit">
          <input type="reset" name="Submit2" value="reset"> </td>
        </tr>
      </table>
    </form>简单的做出来了,信也收到了。但是如何能在信里显示出发件人姓名,发件人地址,像正常OUTLOOK,姓名,邮件地址,主题来?
      

  2.   

    我想得的结果如下:姓名:_____
    email:_______
    主题:______
    建议:_______(多行)提交按钮点击提交后,发送邮件。收件人收到邮件后,会有发信人地址,主题和建议。发邮件时不调用客户机里的邮件软件。跟留言板一样。请问这样的功能是需要PHP,还是用js就可以完成。有PHP码, 请让我看看
      

  3.   

    PHP的mail函数要服务器设置才可以,就mailto吧,简单
      

  4.   

    bool mail ( string to, string subject, string message [, string additional_headers [, string additional_parameters]])/* recipients */
    $to  = "Mary <[email protected]>" . ", " ; //note the comma
    $to .= "Kelly <[email protected]>";/* subject */
    $subject = "Birthday Reminders for August";/* message */
    $message = '
    <html>
    <head>
     <title>Birthday Reminders for August</title>
    </head>
    <body>
    <p>Here are the birthdays upcoming in August!</p>
    <table>
     <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
     </tr>
     <tr>
      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
     </tr>
     <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
     </tr>
    </table>
    </body>
    </html>
    ';/* To send HTML mail, you can set the Content-type header. */
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";/* additional headers */
    $headers .= "From: Birthday Reminder <[email protected]>\r\n";$headers .= "Cc: [email protected]\r\n";
    $headers .= "Bcc: [email protected]\r\n";/* and now mail it */
    mail($to, $subject, $message, $headers);