Page 1 of 1

php mail()

Posted: Mon Dec 17, 2007 10:01 am
by jamiller
Let me start out by saying that I'm fairly new to this "other" side of php, mysql, apache, where I'm setting all this up for production.

I'm building a website for my company and we are hosting it ourselves. I used XAMPP to install all the services. Yes, I know all about the security of using this method and when I learn more about installing it all myself I will do that (this week), but for now we need the site up quickly. We have a mail server (Microsoft Exchange Server) and I have set that server in the php.ini file. But when I test my form it keeps giving me the error "Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()" even after I changed this line and restarted my services. I read somewhere to test my port 25 by typing telnet localhost 25 which returned an error then I replaced localhost with our mailserver and it says its ready to use and everything appears alright.

So why isn't this working?!

I thought that I may be updating the wrong php.ini file so I found all php.ini files and changed all of them, XAMPP installs php 4 and php 5, but uses 5 by default. Still didn't work...

Any ideas?

Thanks,

Jeff

Posted: Mon Dec 17, 2007 10:45 am
by Zoxive
Sounds like your not editing the right file. When you do edit it, are you (re)starting the server to apply the changes?

phpinfo(); will tell you what php.inf file it is reading.

You should also check out swiftmailer.

Posted: Mon Dec 17, 2007 11:06 am
by jamiller
:P

Should have known... but now i know where to find what ini file is being used.

Thanks!