有没有办法可以为PHP配置xampp服务器以启用mail()函数。如果没有,那么我是否可以安装本地邮件服务器来测试PHP的mail()功能?
答案 0 :(得分:0)
在php.ini上
; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder)
;sendmail_path = "\"G:\xampp\sendmail\sendmail.exe\" -t"
; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the G:\xampp\mailoutput folder
sendmail_path="G:\xampp\mailtodisk\mailtodisk.exe"
取消注释第一个sendmail_path并注释mailToDisk选项。