include_once("includes/config.php"); if($HTTP_POST_VARS['doit'] != "" && $HTTP_POST_VARS['users_address'] != ""){ $from_email = "user at ".$SERVER_NAME; $subject = "message from ".$SERVER_NAME; $comments = substr($HTTP_POST_VARS['comments'], 0); $diag = "** DIAGNOSTIC INFO: **\n ISP/address: ".gethostbyaddr($REMOTE_ADDR)."\n Browser/OS: ".$HTTP_USER_AGENT."\n Referring Page: ".$HTTP_REFERER; $pipe=popen("/usr/sbin/sendmail -oi -t", "w"); if($pipe){ fputs($pipe,"To: {$site_admin}\n"); fputs($pipe,"From: {$users_address}\n"); if($HTTP_POST_VARS['cc'] != "") fputs($pipe,"CC: {$users_address}\n"); fputs($pipe,"Subject: {$subject}\n\n\n"); fputs($pipe,"{$comments}\n\n"); fputs($pipe,"{$diag}\n\n"); pclose($pipe); $success = 1; } else { print""; } } ?>
if($success) print"