Sendmail错误:WAMP中的“答复代码无效:ecur”

时间:2018-07-11 10:25:48

标签: php sendmail

我只是想从本地主机发送一个简单的邮件。我正在关注this method。我的php代码是

shouldAppear

在php.ini文件中

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "From: no-reply@mydomain.com" . "\r\n";
mail("test@mydomain.com","test subject","test body",$headers);

这是sendmail.ini文件

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

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from ="admin@wampserver.invalid"

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = "C:\wamp\bin\sendmail\sendmail.exe -t"

Sendmail调试文件

smtp_server=mail.mydomain.com
smtp_port=587 //Also tried SSl port 465 
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=no-reply@mydomain.com 
auth_password=mypass
pop3_server=
pop3_username=
pop3_password=
force_sender=
force_recipient=
hostname=

错误日志中显示错误消息,其中答复代码无效:出现;如果使用端口465,则错误消息显示套接字错误#10054对等方重置连接。

可能是什么问题?

0 个答案:

没有答案