无法连接到邮件服务器在“本地主机”港口25 [英] Failed to connect to mailserver at "localhost" port 25

查看:2444
本文介绍了无法连接到邮件服务器在“本地主机”港口25的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 警告:mail()[ function.mail]:无法在localhost端口25连接到mailserver,验证php.ini中的SMTP和smtp_port设置,或者在C:\wamp\www\dressoholic\中使用ini_set() register.php在第50行

我的php.ini看起来像这样:

  [邮件功能] 
;仅适用于Win32
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

;仅适用于Win32
; http://php.net/sendmail-from
sendmail_from = you@yoursite.com



解决方案

您需要在本地运行邮件服务器。
如果这是Unix,启用sendmail
如果这是Windows,则安装简单邮件传输服务器(不知道名称是否正确)。例如。对于Windows 2003,请按照以下步骤操作: http://msdn.microsoft.com/en-us /library/8b83ac7t.aspx


I keep getting this error when I try to send an e-mail in PHP:

Warning: mail() [function.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:\wamp\www\dressoholic\register.php on line 50

my php.ini looks like this:

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = you@yoursite.com

I'm using my laptop as a server.. What am I doing wrong? Thanks.

解决方案

You need to be running a mail server locally. If this is Unix, enable sendmail If this is Windows install the Simple Mail Transfer Server (not sure if the name is correct) component of IIs. E.g. for windows 2003 follow this: http://msdn.microsoft.com/en-us/library/8b83ac7t.aspx

这篇关于无法连接到邮件服务器在“本地主机”港口25的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆