2013-11-09 129 views
0

有没有一种方法可以配置PHP的xampp服务器来启用mail()函数。如果没有,那么是否可以安装本地邮件服务器来测试PHP的mail()功能?配置xampp服务器发送邮件?

+0

可能的重复[如何配置XAMPP从本地主机发送邮件?](http://stackoverflow.com/questions/15965376/how-to-configure-xampp-to-send-mail-from-localhost) – kero

回答

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选项。