想在本地测试一下mail发送函数
在Php.ini里面设置了SMTP = 我们的邮件服务器ip  smtp_port = 25 
sendmail_from [email protected]
php 代码如下:
<?php
$name="emily";
$gender="girl";
$toaddress="[email protected]";
$subject='ok'; 
 
$message = "this is the content";/* To send HTML mail, you can set the Content-type header. */
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";/* additional headers */
$headers .= "To: Emily <[email protected]>\r\n";
$headers .= "From: Chenli <[email protected]>\r\n";
$headers .= "Cc: [email protected]\r\n";
$headers .= "Bcc: [email protected]\r\n";
/* and now mail it */
mail($toaddress, $subject, $message, $headers);
?>为什么会报:mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in F:\wamp\www\index.php on line 19   
这是什么问题?应该怎么改啊?请各位指导一下!