Localhost Problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Stelios
Forum Commoner
Posts: 71
Joined: Fri Feb 06, 2004 6:25 am
Location: Surrey/UK

Localhost Problems

Post by Stelios »

Hello guys,

Am trying to test a script locally which is supposed to email something to people and when am trying to send it am getting the following error:

Failed to connect to mailserver at "smtp.localhost.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

I have set the smtp on php.in as smtp=smtp.localhost.com and I have run phpinfo to confirm that is looking at localhost and port 25. I have just changed the httpd.conf server to become localhost as well. I dont have any firewalls running either.

Any ideas for this?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

theres no such thing as localhost.com

try just localhost

do you have a mail server on your local box? is it running?
User avatar
Stelios
Forum Commoner
Posts: 71
Joined: Fri Feb 06, 2004 6:25 am
Location: Surrey/UK

Post by Stelios »

To be honest with you no, I dont have one, how can I make it happen? Sorry if my question sounds stupid, but I am quite new to the whole thing.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

If you're on windows just set the smtp to your ISP's mail server (the one you'd use for outlook etc..)
If you're not on windows then post back with more info on your operating system etc. ;)
User avatar
Stelios
Forum Commoner
Posts: 71
Joined: Fri Feb 06, 2004 6:25 am
Location: Surrey/UK

Post by Stelios »

Did it already and it worked!THANKS A LOT :D
Post Reply