邮件发送这个错误是如何解决呢?

浏览:291 发布日期:2017/10/21 分类:求助交流
<?php
 ini_set('SMTP','localhost');
 ini_set('smtp_port','25');
$to = "257137028@qq.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "257137028@qq.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail Sent.";

?>
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 D:\phpStudy\WWW\test\1021.php on line 9
Mail Sent.
最佳答案
评论( 相关
后面还有条评论,点击查看>>