In order to send email from php, your mail server (postfix, sendmail, whatever) needs to be configured to allow relaying from the machine your php is running from, since php doesn't have an option to "login" to the mail server. In sendmail, this is controlled from the /etc/mail/access file. In postfix, I think the file is /etc/postfix/access. Read the file carefully. Then you can add the line "x.x.x.x RELAY". With x.x.x.x being the ip address of the machine that php is running on. You can also add lines like spamoffers.com REJECT, to block all email from that domain.
To check if your mail server is actually running, type "telnet mailserver.com 25" in your terminal. If it is running, you should get a message like "220 mailserver.com ESMTP...". Then type "quit" to get out.
On Jul 22, 2004, at 2:21 PM, PHP Junkie wrote:
Astrum Et Securis,
I'm using a PowerMac G5 machine, which has the MacOS X Panther. It comes
with the Postfix mail server, which I'm now trying to use with PHP.
I was able to define the sendmail_path to the Postfix sendmail in the PHP.INI ..
Now what happens is, on my localhost when I run the website, and I run a php
page that sends form data to email using the mail() function, it doesn't
give me any error, but the mail never arrives in the defined mailbox.
Any help appreciated.
RSJ
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php