i tried executing the mail() and got the following error "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() "

but SMTP and smtp_port are both set in php.ini more ever other codes are working fine with localhost.

disabled or/and added exception to firewell no result.... tried telnet localhost 25 error:could not connect to localhost port 25:connection failed.....

Thunderbird my mail client says:could not connect to server localhost the connection was refused....

php.ini [mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost

smtp_port = 25

running mercury mail server in xampp... previously working fine but now not working..

link|improve this question
feedback

migrated from superuser.com Dec 30 '10 at 14:54

This question came from our site for computer enthusiasts and power users.

1 Answer

If the firewall is alloowing it, the mail server must not be running. You would need to restart it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.