Hi, does anyone how to solve this? I have a contact form but when I try it form doesnt work. Please give me suggestion. thanks.
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\test_run\hrportal\LeaveApplication.php on line 58
Please Try Again Later. Thank You.
this is my php.ini mail setup.
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = jayson.lacson@da5.com.ph
does anyone how to solve this?
Moderator: General Moderators
Re: does anyone how to solve this?
Do you have a mail server installed? Is it running? Does it accept connections other than from PHP?
Re: does anyone how to solve this?
what mail server? I didnt have an idea for that.
Re: does anyone how to solve this?
You can't send mail without a mail server. The error message says it can't connect to the mail server. Google
Re: does anyone how to solve this?
yes I saw a thread for mail server. hm. thank you so much 
Re: does anyone how to solve this?
This is due to your using a localhost. You need to put this code on a server which has a mail server.
Re: does anyone how to solve this?
No, it's not. You can run a mail server locally.uday8486 wrote:This is due to your using a localhost.
Re: does anyone how to solve this?
mail() function in php used to send emails.
The error displaying in your computer because you are using the code in localhost. put this code on a server which has a mail server
The error displaying in your computer because you are using the code in localhost. put this code on a server which has a mail server
Re: does anyone how to solve this?
Again, no. This is simply not true.dsnraju wrote:The error displaying in your computer because you are using the code in localhost.