[求助]如何实现邮箱验证,怎么去实现程序呢?
<%Function IsValidEmail(email)
Dim names,name,i,c
ISvalidEmail=TURE
names=Split(email,"@")
If Ubound(names)<>1 Then
IsValidEmail=FALSE
Exit Function
End if
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 IsNumber(c) Then
IsValidEmail=FALSE
Exit Function
End if
Next
If Left(name,1)="." 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=Len(Names(1))-InStrRev(names(1),".")
If i<>2 AND i<>3 Then
ISValidEmail=FALSE
Exit Function
End If
If Instr(email,"..")>0 Then
IsValidEmail=FALSE
End If
End Function
%> 怎么样去实现它呢?