I am new to PHP. I m trying to make page for "Writing code to SEND A MESSAGE". I have connetcted to localhost but its not going through and showing this error message. 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:\wamp\www\Newland Tours\TMP5m5d4p19i0.php on line 6 Can any one tell me.. how to solve problem >????
If you don't understand the error message, or if you are not familiar with php.ini then you should contact you hosting company and tell them the story.
You are running on localhost. You will need to open port 25 and configure the installation to work with your real online mailsever. That may or may not be a smart thing to do. I can't tell you how since I chose not to do it. There should be some info in you doc files on how to do it.
You will see this error if you dont have internet connection working. Further it looks like you are running the script on your PC. Upload to server and see how it works.
Do you have any POP or SMTP accounts you use for email? For instance i use outlook for my email on my server which has a POP and SMTP server. The settings in outlook for my SMTP will go like mail.domain.com , you can put the same mail server address in your php.ini. If your SMTP requires POP before SMTP , then when you check email with outlook once via the POP, it makes your IP valid for sending out emails through the SMTP for i think one hour. Hope this gives you a pointer. Otherwise as the rest said the best option is to use a proper hosting server for this type of thing.