Hi, I need to have php called from sendmail. I have set up an address to be aliased to "|/usr/local/bin/proc-mail" but I get an error saying "service unavailable". All permissions correct. See php code below. This is just a test mechanism, right now, to send the email to a mysql database for a free-webmail system.
#!/usr/local/bin/php -q <?php $db_name = "mail"; $table_name = "Messages"; $connection = @mysql_pconnect("mysql.tossell.net","mail","fhsdbfhksdbfhjsd") or die("Couldn't connect."); $db = @mysql_select_db($db_name, $connection) or die("Couldn't select database."); $sql = "insert into $table_name (rcpt, send, subject) VALUES ('ken','[EMAIL PROTECTED]','SUP?')"; mysql_select_db( $db_name, $connection ); mysql_query($sql); ?> Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php