HOME > PHP > PHP Forum > เรื่องการส่งเมลด้วย php ครับ Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
เรื่องการส่งเมลด้วย php ครับ Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
<?
$To="[email protected]";
$Subject="ทดสอบการส่งเมลล์";
$Massage="ทดสอบการส่งเมลล์ครับ ได้รับแล้วตอบด้วย";
$From="[email protected] ";
mail($To,$Subject,$Massage,$From);
?>
พอทำการรันแล้วผลออกมาเป็น Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\appserv\www\post.php on line 6 ทำไงแก้ครับไม่รู้ต้องไปเซ็ทตรงไหน
<?
$To="[email protected]";
$Subject="ทดสอบการส่งเมลล์";
$Massage="ทดสอบการส่งเมลล์ครับ ได้รับแล้วตอบด้วย";
$From="[email protected] ";
mail($To,$Subject,$Massage,$From);
?>
พอทำการรันแล้วผลออกมาเป็น Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in c:\appserv\www\post.php on line 6 ทำไงแก้ครับไม่รู้ต้องไปเซ็ทตรงไหน
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
เวลาอยู่บนคอมพิวเตอร์เรา ยังจะไม่สามารถ ส่งอีเมล์ได้ครับ เพราะว่าเรายังไม่ได้ติดตั้ง Mail Server
แต่ถ้าแบบนี้ก็น่าจะส่งได้อ่ะครับ พอเรา Upload ขึ้น Server ก็คงส่งได้อ่ะครับ