เขียน php ส่งเมลผ่านเวป โดนโฮสระงับเพราะคิดว่าสแปม มีวิธีแก้ไขยังไงครับ

เริ่มโดย m_manthai, 15 มกราคม 2014, 22:02:00

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

m_manthai

เขียน php ส่งเมลผ่านเวป โดนโฮสระงับเพราะคิดว่าสแปม มีวิธีแก้ไขยังไงครับ ถ้าในด้านสคริป

สมมุติว่ามีช่อง textbox คล้ายๆ contact me นี่แหละ  ใครป้อนอะไรก็จิ้ม แล้วเมลจะถูกส่งไปหาปลายทาง

ระบบจะเข้าใจว่าเป็นแสปมเมื่อผู้ส่ง ส่งจากคนๆเดียว ผู้รับเป้นแค่คนๆเดียว ใช่หรือไม่

แม้ว่าจะมีสมาชิกเวปสัก 300 คนที่ส่งได้ แต่ใช้คริปร่วมกัน ใช้ตัวส่งตัวเดียวกัน แค่ผู้ป้อนข้อมูลหรือข้อมูลมาจากสมาชิกคนต่างๆ

และส่งไปหาคนๆเดียวคือครู (อีเมลเดียว)

ระบบที่ผมกำลังพุดอยู่นี้คือ นศ ส่งการบ้านอาจารย์ครับ

ผมใช้ phpmailer  

คำสั่งส่งจะแนวๆนี้ คือใช้ความสามารถของโฮสช่วยส่งนั่นเอง

$subject = 'Message form'.$_POST['email'];

         $mail = new Mail();
         $mail->protocol = 'mail';
         $mail->setTo($_POST['email']);
         $mail->setFrom($_POST['email']);
         $mail->setSender('NoobMan');
         $mail->setSubject(html_entity_decode($subject, ENT_QUOTES, 'UTF-8'));
         $mail->setHtml($html);
         $mail->setText(html_entity_decode($text, ENT_QUOTES, 'UTF-8'));
         $mail->addAttachment($filename);
         $mail->send();
         $flag = true;


แม้ว่านักศึกษาจะหลายคน แต่มันจะเข้าใจเอาเองว่าเมลมาจากคนๆเดียวหรือเปล่าครับ เพราะตัวส่งเมลจริงๆความเป็นสมาชิกของโฮสนั่นเองส่ง


หรือว่าปัญหานี้มันมาจากข้อจำกัดของโฮสกันแน่ ผมควรจะขยายเพดานการส่งเมลไว้ ปกติมันขยายได้หรือไม่ กำลังรอคำตอบจากผู้ให้เช่าอยุ่เหมือนกันครับ

เพราะ นศ อาจจะหลายร้อยคน  ผมมาถามในห้องนี้เผื่อว่าจะได้แก้ไขได้จากหลายๆทาง


อีเมลนั้นใช้ได้ปกติมาปีหนึ่งแล้ว พอดีปลายๆปีอาจจะมีเด้กเข้าเรียกเยอะ หรือผมไปทำอะไรมันบ้าง ยังไม่ค่อยแน่ใจ

ใครพอจะแนะนำอะไรมั้ยครับ



ระบบส่งอีเมลมาเตือนดังนี้

Subject: Warning: 1 emails have just been sent by planetoc   Today at 01:45

The planetoc account has just finished sending 1 emails.
There could be a spammer, the account could be compromised, or just sending more emails than usual.

After some processing of the /etc/virtual/usage/planetoc.bytes file, it was found that the highest sender was [email protected], at 2 emails.



The most common path that the messages were sent from is /home/planetoc/domains/flash2idea.com/public_html/sendmail/test1, at 2 emails (200%).
The path value may only be of use if it's pointing to that of a User's home directory.
If the path is a system path, it likely means the email was sent through smtp rather than using a script.

This warning was generated because the 1 email threshold was hit.

================================
Automated Message Generated by DirectAdmin

BrainFreeze

user ส่งเมลเอง หา email account อื่น ที่ยินดีจะรับ email นั้นอยู่แล้วไม่ว่าจะด้วยวิธีใด ผู้ให้บริการไม่มีสิทธิ์ตัดสินว่า mail นั้นเป็น spam mail ครับ
ผมว่าปัญหาคือจำนวนที่ส่งมากกว่าครับ ผมแนะนำว่าให้ลองคุยกับผู้ให้บริการครับว่า อนุญาติให้ส่งได้วันละกี่ mail

จากข้อความข้างต้นคือผู้ให้บริการ limit การส่งของ user ท่านไว้ที่ 1 email ต่อวันครับ ปัญหาไม่ได้มาจาก รูปแบบการส่ง หรือ phpmailer แต่อย่างใดครับ

:wanwan017:
# จัดไป Promo Code ลด 11% : THAISEOBOARD
# [direct=https://www.hostatom.com]hostatom.com[/direct] |โฮสอะตอม - เว็บโฮสติ้งที่ Webmaster มืออาชีพไว้วางใจ
# [direct=https://www.hostatom.com/web-hosting]Web Hosting[/direct] | [direct=https://www.hostatom.com/cloud-vps]Cloud VPS[/direct] | [direct=https://www.hostatom.com/reseller-hosting]Reseller Hosting[/direct] | [direct=https://www.hostatom.com/domain-name]Domain Name[/direct]
# บริการ 24x7 | รับประกันความพอใจยินดีคืนเงิน | Uptime 99.9% | โทร : 0-2107-3466

Unlocker

[direct=https://drive9x.com]FREE! ระบบ Google Drive Proxy ที่เจ๋งที่สุด[/direct]
hostalternative [direct=https://www.hostalternative.com]vpsสำหรับเว็บสายโหดสายดาร์ก คนเข้าเกิน100k จูนให้ฟรี ลื่นหัวแตก[/direct]
รับจูน VPS/Server ประสบการณ์10ปี+

iLhay

พูดกันด้วย logs ครับ

logs บอกทุกอย่างเอง ว่า spam หรือไม่ spam

คุยกับผู้ให้บริการ จะตรงกว่ามาถามแบบนี้ครับ
[direct=https://bangmod.cloud/wordpress-hosting/]Wordpress Hosting

[/direct]
[direct=https://bangmod.cloud/wordpress-hosting/]Wordpress Hosting[/direct] เริ่มต้นปีละ 790 บาท NVMe SSD เร็ว 9000MB/s เร็วกว่านี้ไม่มีอีกแล้ว
[direct=https://bangmod.cloud/cloud-server]Cloud Server[/direct] เริ่มต้นเพียงเดือนละ 159 บาท พร้อมใช้ภายใน 1 นาที ผ่านระบบอัตโนมัติมีทั้ง Linux / Windows / DirectAdmin
สอบถามข้อมูลและแจ้งปัญหา 02-105-4417 ตลอด 24 ชั่วโมง

superskip

ฟังก์ชั่น mail() ของ php ที่มีให้มานั้น มักจะเจอกับปัญหาส่งอีเมลล์แล้วไปลง junk หรือ spam box ของผู้รับครับ โดยทั่วไปผมก็จะเขียนผ่าน SMTP แทน

<?PHP
require("PHPMailer_v5.0.2/class.phpmailer.php");
$mail = new PHPMailer();

$body = "ทดสอบการส่งอีเมล์ภาษาไทย UTF-8 ผ่าน SMTP Server ด้วย PHPMailer.";

$mail->CharSet = "utf-8";
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Host = "smtp.yourdomain.com"; // SMTP server
$mail->Port = 25; // พอร์ท
$mail->Username = "[email protected]"; // account SMTP
$mail->Password = "******"; // รหัสผ่าน SMTP

$mail->SetFrom("[email protected]", "yourname");
$mail->AddReplyTo("[email protected]", "yourname");
$mail->Subject = "ทดสอบ PHPMailer.";

$mail->MsgHTML($body);

$mail->AddAddress("[email protected]", "recipient1"); // ผู้รับคนที่หนึ่ง
$mail->AddAddress("[email protected]", "recipient2"); // ผู้รับคนที่สอง

if(!$mail->Send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
} else {
    echo "Message sent!";
}
?>

Freedomlover

limit ไว้ 1 ฉบับต่อวัน  อาจจะเป็นเพราะ ก่อนหน้านี้เคยถูกใช้ส่ง spam ก็ได้ครับ ผู้ให้บริการเลยลดจำนวนลง  หรือไม่ก็ใส่จำนวนผิด  :P
[direct=https://www.jaideawhosting.com/web-hosting/]โฮสติ้ง[/direct] คุณภาพสูง ราคาเริ่มต้น 50 บาท/เดือน ทดลองใช้ฟรี 30 วัน
[direct=https://www.jaideawhosting.com/vps-hosting/]SSD VPS[/direct] แรงๆ
จดโดเมนเพียง 400 บาท/ปี
ด้วยประสบการณ์กว่า 12 ปี  Tel 0840640213

smapan

อ้างถึงจาก: Freedomlover ใน 16 มกราคม 2014, 08:35:11
limit ไว้ 1 ฉบับต่อวัน  อาจจะเป็นเพราะ ก่อนหน้านี้เคยถูกใช้ส่ง spam ก็ได้ครับ ผู้ให้บริการเลยลดจำนวนลง  หรือไม่ก็ใส่จำนวนผิด  :P

:wanwan044: ผมก็ตกใจนิดนึงกับ log น่าจะติดต่อผู้ให้บริการจะดีที่สุดครับ
[direct=http://cp.siamhostweb.com/cart.php?gid=1]จูมล่าโฮส สยามโฮสเว็บ[/direct] [direct=http://www.modty.com]modty.com[/direct]
[direct=http://www.apartment.in.th]รวมที่พัก เช่ารายวัน ที่พักเช่ารายเดือนมากที่สุดแจ่มจริง[/direct]
***Tel 083-757-1515 ติดปัญหา Joomla ตรงไหนรับปรึกษาฟรี โทรมาเถอะครับ ถ้าตอบได้ช่วยแน่นอน ไม่มีกั้ก. ***


KONINW

อ้างถึงจาก: superskip ใน 15 มกราคม 2014, 23:14:34
ฟังก์ชั่น mail() ของ php ที่มีให้มานั้น มักจะเจอกับปัญหาส่งอีเมลล์แล้วไปลง junk หรือ spam box ของผู้รับครับ โดยทั่วไปผมก็จะเขียนผ่าน SMTP แทน

<?PHP
require("PHPMailer_v5.0.2/class.phpmailer.php");
$mail = new PHPMailer();

$body = "ทดสอบการส่งอีเมล์ภาษาไทย UTF-8 ผ่าน SMTP Server ด้วย PHPMailer.";

$mail->CharSet = "utf-8";
$mail->IsSMTP();
$mail->SMTPDebug = 0;
$mail->SMTPAuth = true;
$mail->Host = "smtp.yourdomain.com"; // SMTP server
$mail->Port = 25; // พอร์ท
$mail->Username = "[email protected]"; // account SMTP
$mail->Password = "******"; // รหัสผ่าน SMTP

$mail->SetFrom("[email protected]", "yourname");
$mail->AddReplyTo("[email protected]", "yourname");
$mail->Subject = "ทดสอบ PHPMailer.";

$mail->MsgHTML($body);

$mail->AddAddress("[email protected]", "recipient1"); // ผู้รับคนที่หนึ่ง
$mail->AddAddress("[email protected]", "recipient2"); // ผู้รับคนที่สอง

if(!$mail->Send()) {
    echo "Mailer Error: " . $mail->ErrorInfo;
} else {
    echo "Message sent!";
}
?>


อ้างถึงจาก: shokarita ใน 17 มกราคม 2014, 13:29:18
ใช้ Gmail ในการส่งครับ  :wanwan017: ผ่าน smtp

ใช้ phpmailer + smtp gmail  :wanwan016:
ไม่มีอะไรที่ไม่สำเร็จหากเราไม่ลงมือทำมัน [direct=http://mobileplayerx.com/xxx.html].[/direct]