2013-11-09 130 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選項。