WAMP 3.0.4&发邮件

时间:2016-03-22 21:19:49

标签: php email wamp sendmail

我正在尝试配置我的WAMP服务器以通过sendmail发送电子邮件我甚至设置了gmail帐户和所有内容。在此之前,我的wamp服务器工作正常(绿色)。但现在它的橙色(2个服务中的1个工作)我不熟悉使用WAMP服务器所以我不知道问题是什么。当我在Apache

上启用ssl_module时,问题就出现了

php.ini(来自WAMP界面)

[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 ="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\sendmail\sendmail.exe -t -i"

; 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().
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On

; The path to a log file that will log all mail() calls. Log entries include
; the full path of the script, line number, To address and headers.
;mail.log =
; Log mail to syslog (Event Log on Windows).
;mail.log = syslog

sendmail.ini

[sendmail]


smtp_server=stmp.gmail.com



smtp_port=465


smtp_ssl=ssl

default_domain=localhost


error_logfile=error.log


debug_logfile=debug.log


auth_username= myemail@gmail.com
auth_password= mypassword

pop3_server=
pop3_username=
pop3_password=

force_sender=


force_recipient=



hostname=localhost

1 个答案:

答案 0 :(得分:0)

你不能在php.ini和sendmail.ini中使用不同的smtp。端口号也必须相同。

如果再次禁用ssl模块该怎么办?

同时检查您是否为不同的服务使用相同的端口号。如您所知,您不能为两种不同的服务使用相同的端口号。