我吧php.ini中的设置如下:
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25; For Win32 only.
;sendmail_from = "[email protected]"; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
但是运行一下代码:
<?php
$to = "[email protected]";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email protected]" ;mail($to,$subject,$txt,$headers);
?>
之后,有错误提示如下:
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:\wamp\www\mail.php on line 12
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25; For Win32 only.
;sendmail_from = "[email protected]"; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
但是运行一下代码:
<?php
$to = "[email protected]";
$subject = "My subject";
$txt = "Hello world!";
$headers = "From: [email protected]" ;mail($to,$subject,$txt,$headers);
?>
之后,有错误提示如下:
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:\wamp\www\mail.php on line 12
解决方案 »
- 请问linux下xampp集成环境中怎么为php添加curl扩展?
- php实现分组
- echo "<UL class=\"box-list \">";
- Apache无法加载phpapache2_2.dll
- 正则如何匹配<b>和</b>可能存在或可能不存在?
- Fatal error: Allowed memory size of 587202560 bytes exhausted (tried to allocate 493123764 bytes) in
- select 超链接
- 我这个连上mssql了没有,为什么我print_r($conn)……
- HELP!关于php的ISAPI筛选器的问题!!!
- 谁看得懂并翻译?
- php如何实现这种重新定向功能?
- PHP数据输出
有一个email的类....