ช่วยหน่อย ใช้ phpmailer แล้ว mail ยังลงถังขยะอยู่เลยครับ ไม่ลง inbox

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

Kun Chakun
PHP Newbie
PHP Newbie
โพสต์: 2
ลงทะเบียนเมื่อ: 15/03/2017 5:26 pm

ช่วยหน่อย ใช้ phpmailer แล้ว mail ยังลงถังขยะอยู่เลยครับ ไม่ลง inbox

โพสต์ที่ยังไม่ได้อ่าน โดย Kun Chakun »

ช่วยหน่อย ใช้ phpmailer แล้ว mail ยังลงถังขยะอยู่เลยครับ ไม่ลง inbox

<article class="enquiry_form">
<h1>ENQUIRY FORM</h1>
<form method="post" enctype="multipart/form-data" id="contact-us" name="f1" action="sent.php">
<input name="txt_name" id="email" type="text" placeholder="name" required autofocus><br>
<input name="txt_subj" id="user-name" type="text"placeholder="Subject" required autofocus><br>
<input name="txt_tel" id="tel" type="text" placeholder="Email" required autofocus><br>
<textarea name="area_detail" id="comment" rows="10" cols="70" placeholder="Comment" required autofocus></textarea><br>
<input name="submit" id="submit" TYPE="submit" VALUE="SEND" />

</form>
<br>

</article>
<?
$title =$_POST["txt_name"];
$subject= $_POST["txt_subj"];
$tel= $_POST["txt_tel"];
$detail= $_POST["area_detail"];
?>
<?php

include("class.phpmailer.php");
include("class.smtp.php");

$mail = new PHPMailer();

$mail->CharSet = "utf-8";

$mail->SMTPSecure ='ssl';
$mail->Host ="smtp.siamnavakam.com";
$mail->Port = 25;
$mail->SMTPAuth = true;

$mail->Username = '[email protected]';
$mail->Password = 'xxxx';
$mail->SetFrom($tel);
$mail->FromName = $title;

$mail->Subject = $subject;


$mail->Body ="Name :" .$title." <br> Subject :" .$subject. " <br> Email : " .$tel."<br> Detail : " .$detail; // Huh?Huh?Huh?Huh?Huh?Huh???
$mail->AltBody ="Name : " .$title." <br> Subject : " .$subject. " <br> Email : " .$tel."<br> Detail : " .$detail; // Huh?Huh?Huh?Huh?Huh?Huh???

$mail->AddAddress('[email protected]');


if (empty($_POST["title"]) && empty($_POST["txt_subj"]) && empty($_POST["txt_tel"]) && empty($_POST["area_detail"]) )

{
echo "";
}
else
{
if (!$mail->Send()) {
echo "";
}
else
{
echo "<script> alert(' SEND E-mail '); window.location = 'sent.php'; </script>"; //?Huh?Huh?Huh? mailFrom.html
}
}
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 133