3 * Email.inc 1.00 2001/03/08
5 * Copyright 2001 Czech On Line a.s. All Rights Reserved.
11 * see class.html.mime.mail.inc for more details about
12 * send email functions
20 * is e-mail address valid ?
22 * @param email e-mail addess
24 * @return true or false
26 function isValidEmail($email) {
27 // valid e-mail address must contain @
28 if (strpos($email,'@') == 0) {
31 // validace domeny proti DNS
32 if (getmxrr($domain.".",$null) == false) return false;
38 * Validate e-mail address
39 * tries to correct invalid e-mail
41 * @param email e-mail addess
43 * @return the original e-mail address or modified e-mail address
45 function validateEmail($email) {
48 $email = eregi_replace("\.cy$",".cz",$email);
50 // domain doen't contain ., let's add .cz
51 $domain = substr($email,strpos($email,"@")+1,1024);
52 if (strpos($domain,".") == 0) {
59 function isEmailRegexpValid($email) {
60 if (eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$", $email)) {