Many verification emails are verified on the js client, but it is easy to be broken. If we use asp to verify on the server, there should be no problem. Copy the code code as follows:
'************************************************
'Function name: IsValidEmail
'Function: Check the validity of the email address
'Parameter: email ----Email address to be checked
'Return value: True ----The email address is legal
' False ----The email address is illegal
'************************************************
Public Function IsValidEmail(Email)
Dim names, name, I, c
IsValidEmail = True
names = Split(Email, @)
If UBound(names) <> 1 Then IsValidEmail = False: Exit Function
For Each name In names
If Len(name) <= 0 Then IsValidEmail = False:Exit Function
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
Next
If Left(name, 1) = . Or Right(name, 1) = . Then IsValidEmail = False:Exit Function
Next
If InStr(names(1), .) <= 0 Then IsValidEmail = False:Exit Function
I = Len(names(1)) - InStrRev(names(1), .)
If I <> 2 And I <> 3 Then IsValidEmail = False:Exit Function
If InStr(Email, ..) > 0 Then IsValidEmail = False
End Function