contact by email

contact
by snail mail

Robert Cooper
3331 Moore Hall
405 Hilgard Ave.
Los Angeles, CA 90095

Your Name

Your Email Address

Subject

Message

Invalid Access

Improper use of GSE&IS resources.

\n"); } $ReplyTo = clean_data ( $_POST['ReplyTo'] ); $ReplyToAddress = clean_data ( $_POST['ReplyToAddress'] ); $ToAddress = clean_data( $ToAddress ); $Subject = clean_data( $_POST['Subject'] ); $Message = clean_message ( $_POST['Message'] ); // check against spam abuse if (!strpos($ToAddress, $ValidDomain)) { error_log("HACK: Webmail sent to $ToAddress from:{$_SERVER['REMOTE_ADDR']} page:{$_SERVER['PHP_SELF']}"); die("

System Error

There has been a problem sending mail.

"); } // check for valid email address if ( eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+([a-z]{2,3}$)", $ReplyToAddress, $verify) ) { $address = "OK"; } // verify name exists if ( eregi("^[a-z]{3}", $ReplyTo) ) { $name = "OK"; } // verify message exists if ( eregi("^.{4}", $Message) ) { $themessage = "OK"; } // echo "$ReplyToAddress
$ReplyTo
$Message"; if ( $address != "OK" || $name != "OK" || $themessage != "OK" ) { ?>

Error

Your e-mail cannot be sent without the following information...

Please use your browser's back button to re-submit the email form after filling out the above fields.

host_name="mail.gseis.ucla.edu"; $smtp1->localhost="localhost"; // finally, mail it if($smtp1->SendMessage($ReplyToAddress, array($ToAddress), array("From: \"$ReplyTo\" <$ReplyToAddress>","To: $ToAddress","Subject: [Summer Webmail] $Subject"), $Message)) { //SHOW CONFIRMATION PAGE error_log("SUCCESS: WebMail Reply from:$ReplyToAddress page:{$_SERVER['PHP_SELF']} subject:$Subject"); ?>

Mail Sent

An error occurred...

Could not send the message to $ToAddress.

Error: error; ?>

host_name="mail.gseis.ucla.edu"; $smtp2->localhost="localhost"; // send autoreply if(!$smtp1->SendMessage($ToAddress, array($ReplyToAddress), array("From: \"$ToName\" <$ToAddress>","To: $ReplyToAddress","Subject: Re: $Subject"), "$AutoRespondMessage\n\n$Message")) { echo "

Auto Reply not sent. Error: ".$smtp2->error."

"; error_log("FAILURE: WebMail Reply for:$ReplyToAddress page:{$_SERVER['PHP_SELF']} subject:$Subject"); } else { error_log("SUCCESS: WebMail Reply for:$ReplyToAddress page:{$_SERVER['PHP_SELF']} subject:$Subject"); } } } } } // CORE FUNCTIONS function clean_data ( $data ) { $data = strip_tags ( $data ); $data = stripslashes ( $data ); $data = eregi_replace("[[:space:]]+", " ", $data); $data = trim ( $data ); return $data; } function clean_message ( $data ) { $data = strip_tags ( $data ); $data = stripslashes ( $data ); $data = trim ( $data ); return $data; } ?>