Sending mail with PHP on linux machine through exchange on Windows server 2003
I have a website on a linux Redhat 9 runing apache with PHP4.
I wish to use the mail() command with PHP but I can't seem to be able to configure my PHP to work with our local mailserver wich is EXCHANGE on a Windows Server 2003 box.
I tried changing my PHP.ini file
SMTP = localMailserverIP
sendmail_from = account@localMailserver (this is a POP enabled account)
but it doesn't work. I am able however to send mail when using a mailclient with the same info from the redhat box.
Anybody have an idea?
On Linux, what you set in php.ini does not matter - only for Windows.
I think the reason is that most if not all linuxes should have setup email - in Unix email is used for a lot of stuff, e.g. a task scheduler (cron) sends email to root when something is wrong.
So just install a MTA - you can use sendmail, exim, postfix and many others. I think postfix is the easiest to setup. Then configure it to use the exchange server as "smart host" - and the mail function in PHP will work.
Thanks dude, It's working fine now!!
|All times are GMT -5. The time now is 11:50 AM.|