&&youyou 2022-09-17 21:05 采纳率: 100%
浏览 12
已结题

PHP邮箱发送问题提问


<!DOCTYPE html>
<html>
<body>

<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ; 
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail( "2674944162@qq.com", "Subject: $subject",
  $message, "From: $email" );
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text' />
Subject: <input name='subject' type='text' />
Message:
<textarea name='message' rows='15' cols='40'> </textarea>
<input type='submit' /> </form>"
; } ?>
</body> </html>

img

  • 写回答

2条回答 默认 最新

  • CSDN专家-showbo 2022-09-17 21:08
    关注

    看代码没问题,php的环境安装好了吗?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 9月25日
  • 已采纳回答 9月17日
  • 创建了问题 9月17日