尝试使用PHP发送电子邮件,然后使用SMTP4DEV接收电子邮件仅记录会话,并且不返回eamil

时间:2018-10-12 08:25:15

标签: php email smtp apache2.4

我正在使用PHP内置的mail()函数:

mail("test@gmail.com", "test", "hello");

我的PHP.ini设置如下:

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



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

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;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().
;mail.force_extra_parameters =

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

; 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

然后让SMTP4DEV在同一端口上侦听。每次加载网页时,都会将新的会话日志添加到SMTP4DEV,但实际上并不会在电子邮件框中显示电子邮件。这是来自SMTP4DEV的会话日志:

220 localhost smtp4dev ready
QUIT
221 See you later aligator

有人知道这是什么问题吗,或者我如何查看一些日志以查找导致此问题的错误?

0 个答案:

没有答案