Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-18-2004, 04:54 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
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?

Old 06-18-2004, 08:12 AM   #2
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448

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.
Old 06-18-2004, 12:02 PM   #3
LQ Newbie
Registered: Apr 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks dude, It's working fine now!!


Last edited by TVScoundrel; 06-18-2004 at 12:48 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending mail from linux using MS Exchange relay host a2k2 Linux - General 0 08-16-2004 01:55 PM
Sending mail with PHP on linux machine through exchange on Windows server 2003 TVScoundrel Linux - Newbie 1 06-18-2004 01:22 PM
Using mail filters with Exchange 2003 ? tux1982 Linux - General 0 06-07-2004 08:15 PM
Linux Mail Server and Exchange Mail vvandam Linux - Networking 10 07-11-2003 04:42 PM
POstfix not sending to a local exchange server hawkpaul Linux - Software 10 06-04-2003 07:54 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration