當出現下列錯誤,代表mail server參數需要設定.
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\myweb\include\pear\Mail\mail.php on line 131Fatal Error: Contact system adminstrator.
修改"組態設定值"檔,開啟"C:\xampp\php\php.ini"檔案,使用" ; "注解掉,"; SMTP = localhost",增加"SMTP = server.mail.com ",實際的mail名稱可以詢問公司MIS人員,範例如下.
[mail function]
; For Win32 only.
; http://php.net/smtp
; SMTP = localhost
SMTP = server.mail.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost
沒有留言:
張貼留言