您只是在不同的組合中重複使用相同的變量,使用相同的功能只是將它們發回給它們。
mail($email, "Thank You", "We Have Recived Your Request blablabla", "From: [email protected]");
Tada。
發送相同的消息,你和他們使用:
<?php
$name = $_REQUEST['name'] ;
$company = $_REQUEST['company'] ;
$areacode_telephone = $_REQUEST['areacode_telephone'] ;
$telephone = $_REQUEST['telephone'] ;
$email = $_REQUEST['email'] ;
$notes = $_REQUEST['notes'] ;
$body = " Name: ".$name."\n
Company: ".$company."\n
Area Code: ".$areacode_telephone."\n
Telephone: ".$telephone."\n
Email Address: ".$email."\n
Notes: ".$notes;
mail("[email protected], $email", "Axsiom: Contact Us", $body, "From: $email");
?>
要發送不同的消息,你和他們使用:
<?php
$name = $_REQUEST['name'] ;
$company = $_REQUEST['company'] ;
$areacode_telephone = $_REQUEST['areacode_telephone'] ;
$telephone = $_REQUEST['telephone'] ;
$email = $_REQUEST['email'] ;
$notes = $_REQUEST['notes'] ;
$body = " Name: ".$name."\n
Company: ".$company."\n
Area Code: ".$areacode_telephone."\n
Telephone: ".$telephone."\n
Email Address: ".$email."\n
Notes: ".$notes;
//to you
mail("[email protected]", "Axsiom: Contact Us", $body, "From: $email");
//to them
mail($email, "Thank You", "We Have Recived Your Request blablabla", "From: [email protected]");
?>
什麼是淨化'$ _REQUEST'變量在這裏?這是你創建的一個數組還是所有這些數據都是由用戶直接提供的? – sarnold
嗯,如果你可以發送郵件到'info @ axsiom.com.au'爲什麼你不能發送一個''email'就像'mail($ email,「Thanks」,$ msg,「noreply @ axsiom」 )' –