<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <? $strHeader = "Content-type: text/html; charset=UTF-8\n"; // or UTF-8 // $strTo = "[email protected]"; $strSubject = $_POST["txtSubject"]; $strMessage = nl2br($_POST["txtDescription"]); //*** Uniqid Session ***// $strSid = md5(uniqid(time())); $strHeader = ""; $strHeader .= "From: ".$_POST["txtFormName"]."<".$_POST["txtFormEmail"].">\nReply-To: ".$_POST["txtFormEmail"].""; $strHeader .= "Cc: [email protected] \n"; $strHeader .= "MIME-Version: 1.0\n"; $strHeader .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n"; $strHeader .= "This is a multi-part message in MIME format.\n"; $strHeader .= "--".$strSid."\n"; $strHeader .= "Content-type: text/html; charset=UTF-8\n"; // or UTF-8 // $strHeader .= "Content-Transfer-Encoding: 7bit\n\n"; $strHeader .= $strMessage."\n\n"; //*** Attach ***// if($_FILES["fileAttach"]["name"] != "") { $strFilesName = $_FILES["fileAttach"]["name"]; $strContent = chunk_split(base64_encode(file_get_contents($_FILES["fileAttach"]["tmp_name"]))); $strHeader .= "--".$strSid."\n"; $strHeader .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n"; $strHeader .= "Content-Transfer-Encoding: base64\n"; $strHeader .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n"; $strHeader .= $strContent."\n\n"; } $flgSend = @mail($strTo,$strSubject,null,$strHeader); // @ = No Show Error // if($flgSend) { echo "<script> alert('Sending E-mail successfully') window.location='sendmail.php' </script>"; } else { echo "<script> alert('Can not send e-mail at this time. Try again!') window.location='sendmail.php' </script>"; } ?> </body> </html>
$strTo = "[email protected]"; $strSubject = $_POST["txtSubject"]; $strMessage = nl2br($_POST["txtDescription"]); //*** Uniqid Session ***// $strSid = md5(uniqid(time())); $strHeader = ""; $strHeader = "Content-type: text/html; charset=UTF-8\n"; // or UTF-8 // $strHeader .= "From: ".$_POST["txtFormName"]."<".$_POST["txtFormEmail"].">\nReply-To: ".$_POST["txtFormEmail"]."";
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง