使用PHPMailer以后需要更改php.ini文件吗
程序员文章站
2022-05-16 22:02:16
...
我看网上的教程,直接用就可以发送邮件了,不用改什么IIS或者是PHP.ini文件的。但是我这里会报错:
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:\inetpub\wwwroot\test\conn\pwdEmail.php on line 43 Mail Sent.SMTP -> ERROR: Failed to connect to server: (0)
SMTP Error: Could not connect to SMTP host. 邮件发送出错:SMTP Error: Could not connect to SMTP host.
求指导
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:\inetpub\wwwroot\test\conn\pwdEmail.php on line 43 Mail Sent.SMTP -> ERROR: Failed to connect to server: (0)
SMTP Error: Could not connect to SMTP host. 邮件发送出错:SMTP Error: Could not connect to SMTP host.
求指导
回复讨论(解决方案)
很奇怪,你是怎么用的?怎么会用到 mail() 函数?
贴出你的代码
忘屏蔽了,谢谢您的指点哈!
很奇怪,你是怎么用的?怎么会用到 mail() 函数?
贴出你的代码
大仙可否再指点下一个小问题:我尝试163的smtp方式,根本就连接不上去!又尝试了qq邮箱,可以连上,但是还没发送出去就被过滤了!!!!需要在qq邮箱登陆后的页面里填写验证码才能完成发送呀!
求指导!