Click to See Complete Forum and Search --> : Inter server communication with PHP


Benoni
12-15-2004, 12:40 PM
I just got a PHP e-mail system set up on my web server only to discover that the mail server wasn't on the same machine. The mail server pipes the mail to a script, which then passes it on to the mail software which processes it. The problem is that with them being on seperate machines this can't happen. MySQL (on this machine) doesn't support remote connections either so I can't do it that way.
I don't have a clue how to get past this and couldn't find any way to do it in PHP. One idea I had was to pass the data on with a POST request, however I couldn't find a way to do this. If anyone could help me do this, or has any other ideas, I would be very greatful.
Thanks
Benoni

shimon
12-20-2004, 07:32 AM
If I understand you correctly (of which I'm not entirely confident!) this may be something you can solve at a configuration level. What I mean is, you can configure PHP to use an external mail server rather than 'localhost'. Check out the manual here:

http://www.php.net/mail

Though I guess the mail server would have to be set up to accept connections from your web server.

Is this roughly what you're thinking of, or have I missed your point entirely?

Benoni
12-20-2004, 04:39 PM
Thanks for your reply. The problem was in getting mail from the mail server to the webserver where there there was a web interface. I have just sorted that by posting the data to the web server as a HTTP request with fsocketopen().
Benoni