LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Sending mail with PHP on linux machine through exchange on Windows server 2003 (https://www.linuxquestions.org/questions/linux-networking-3/sending-mail-with-php-on-linux-machine-through-exchange-on-windows-server-2003-a-194915/)

TVScoundrel 06-18-2004 04:54 AM

Sending mail with PHP on linux machine through exchange on Windows server 2003
 
Hi everybody,

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?

Cheers,
TVScoundrel

Guttorm 06-18-2004 08:12 AM

Hi

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.

TVScoundrel 06-18-2004 12:02 PM

Thanks dude, It's working fine now!!

Cheers,
TVScoundrel


All times are GMT -5. The time now is 12:17 PM.