// File : sendmail.php3 function valid_address($addr) { // if (strlen($addr)>80) // return 0; // if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$addr)) // Above is the best regular expression, that could be used. But, a bug? // in PHP eregi(), gives "document contains no data" error. // if(eregi("^[_a-z0-9][\._a-z0-9-]*$",$addr)) // return 1; // else // return 0; return 1; } if (($mailTo == "")||($mailSubject == "") || ($mailFrom == "")) { $init_mailTo = $tocookie; $init_mailFrom = $fromcookie; $encoded=urlencode($tocookie); $decoded=urldecode($encoded); // show the form print(""); print("
"); print("