if ( array_key_exists('to', $HTTP_POST_VARS) and !preg_match("/^[0-9a-zA-Z\.\-\_]+\@([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,4}$/", $HTTP_POST_VARS['to']) ) {
print "| You must enter a valid email address in the 'To' field |
\n";
} elseif ( array_key_exists('from', $HTTP_POST_VARS) and !preg_match("/^[0-9a-zA-Z\.\-\_]+\@([0-9a-zA-Z\-]+\.)+[a-zA-Z]{2,4}$/", $HTTP_POST_VARS['from']) ) {
print "| You must enter a valid email address in the 'From' field |
\n";
} elseif ( array_key_exists('from', $HTTP_POST_VARS) and array_key_exists('to', $HTTP_POST_VARS) ) {
print "| E-mail Sent to ".$HTTP_POST_VARS['to']."!"." |
\n";
SendMail($HTTP_POST_VARS['to'], $HTTP_POST_VARS['from'], "Check out this site!", $HTTP_POST_VARS['message']);
}
?>
| To: | |
| From: | |
| Message: | |
| |