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

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: ช่วยหน่อย ใช้ phpmailer แล้ว mail ยังลงถังขยะอยู่เลยครับ ไม่ลง inbox

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

โดย Kun Chakun » 16/03/2017 4:53 pm

ช่วยหน่อย ใช้ 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
}
}

ข้างบน