|
|
|
ผมทำฟอร์มส่งเมล์และเทสการส่งเมล์ได้แล้ว แต่จะกำหนดยังไงให้มันแจ้งว่าส่งมาจากที่ไหน ดังรายละเอียด |
|
|
|
|
|
|
|
Code (PHP Sending Email Contact Form)
<html>
<head>
<title>ThaiCreate.Com PHP Sending Email</title>
</head>
<body>
<?
$strTo = $_POST["txtTo"];
$strSubject = $_POST["txtSubject"];
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: ".$_POST["txtFormName"]."<".$_POST["txtFormEmail"].">\nReply-To: ".$_POST["txtFormEmail"]."";
$strMessage = nl2br($_POST["txtDescription"]);
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}
?>
</body>
</html>
|
|
|
|
|
Date :
2010-06-10 20:37:42 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|