XAMPP for Windows と OpenPNE の組み合わせで、メール送信処理の時にエラーが発生する。
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 …
PHPの設定を変更することで、正常に動作するようになるようだ。
c:\xampp\apache\bin\php.ini の以下の箇所を修正する。
変更前
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
変更後
sendmail_pathの頭にある「;」を削除する。
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
修正後、Apacheを再起動すると、変更が反映される。(再起動するまでは修正が反映されないので注意)