Function isvalidemail (email) DIM Names, Name, I, C isvalidemail = true names = split (email, "@") if ubound (name) <> 1 damValidemail = false exit function end if for for Each Name in Names if Len Name) <= 0 THEN isvalidemail = false exit function end if for i = 1 to len (name) c = LCase (MID (Name, I, 1)) IF INSTR ("AbcdefghijklmnopqrStuvwxyz_-.", c) <= 0 and NOT ISNUMERIC (C) THEN isvalidemail = false exit function end if next If = "or right (name, 1) =". "THEN isvalidemail = false exit function end if next if INSTR (Names) 1), ".") <= 0 Then isvalidemail = false exit function end if i = le (names (1)) - Instrrev (Names (1), ".") IF i <> 2 and i <> 3 THEN Isvalidemail = false exit function end if IF instruction (email, "..")> 0 the isvalidemail = false end ifend function
Email = Trim ("email")) if isvalidemail (email) = false the response.write "