如何制作联系表格向用户发送确认电子邮件?

This is what i have so far..

 $full_name = $_REQUEST['full_name'] ;         
 $company = $_REQUEST['company'] ;       
 $abn = $_REQUEST['abn'] ;     
 $customer_number = $_REQUEST['customer_number'] ;     
 $about = $_REQUEST['about'] ;     
 $areacode = $_REQUEST['areacode'] ;     
 $telephone = $_REQUEST['telephone'] ;         
 $email = $_REQUEST['email'] ;     
 $message = $_REQUEST['message'] ;     
 $body =" Full Name: ".$full_name."


Company: ".$company."
                 
ABN: ".$abn."
    
Customer Number: ".$customer_number."

About: ".$about."
       
Area Code: ".$areacode."
      
Telephone: ".$telephone."
     
Email: ".$email."
                     
Message: ".$message;

$to = "$email";

 mail( "info@rentforbusiness.com.au", "Contact Us Form", $body, "From: $email" );

Just like you do for yourself.

mail($email, "Thanks For Resistering", $a_thank_you_message, "From: info@rentforbusiness.com.au" );

Create a table in database. It should contains fields:

  • id (auto increment)
  • email
  • message
  • confirmation

When user posts the form, don't send mail to your email, instead of it you need to create random confirmation code (using uniqid for example):

$confirmation = uniqid();

Then add user email, message text and confirmation code to table and send email to user:

$url = "http://".$_POST["SERVER_NAME"].
  "/confirmation.php?confirmation=$confirmation'>";
mail($email, "Confirmation", 
 "Please press the following link to confirm your message: 
 <a href='http://$url'>confirm</a>.");

In confirmation.php file use $_GET["confirmation"] variable, search for matching record in the table, get email and message from it and send this data to your email. You can remove entry from database after it if you want.