- <%
- str0 = Request.Form("adressemail")
- str1 = Replace(str0,";",".")
- str2 = Replace(str1,"^","")
- str3 = Replace(str2," ","")
- str4 = Replace(str3,"é","e")
- str5 = Replace(str4,"è","e")
- str6 = Replace(str5,"à","a")
- str7 = Replace(str6,"ù","u")
- str8 = Replace(str7,"ç","c")
-
- Function IsValidEmail( ByVal sString)
- Dim sEmail, nIndex, nDotIndex
- IsValidEmail = False
- sString = Trim(sString)
- nIndex = InStr(1, sString, "@")
- If nIndex < 2 Then
- Exit Function
- End If
- nDotIndex = InStrRev(sString, "." )
- If nDotIndex < nIndex + 1 Then
- Exit Function
- End If
- If InStr( nIndex + 1, sString, "@" ) > nIndex Then
- Exit Function
- End If
- If nDotIndex > Len( sString ) - 2 Then
- Exit Function
- End If
- IsValidEmail = True
- End Function
-
- If IsValidEmail(str8) = True Then
- response.write("Adresse Ok")
- response.write("<BR>")
- response.write str8
- else
- response.write("Adresse invalide")
- response.write("<BR>")
- response.write Request.Form("adressemail")
- End If
- %>
<%
str0 = Request.Form("adressemail")
str1 = Replace(str0,";",".")
str2 = Replace(str1,"^","")
str3 = Replace(str2," ","")
str4 = Replace(str3,"é","e")
str5 = Replace(str4,"è","e")
str6 = Replace(str5,"à","a")
str7 = Replace(str6,"ù","u")
str8 = Replace(str7,"ç","c")
Function IsValidEmail( ByVal sString)
Dim sEmail, nIndex, nDotIndex
IsValidEmail = False
sString = Trim(sString)
nIndex = InStr(1, sString, "@")
If nIndex < 2 Then
Exit Function
End If
nDotIndex = InStrRev(sString, "." )
If nDotIndex < nIndex + 1 Then
Exit Function
End If
If InStr( nIndex + 1, sString, "@" ) > nIndex Then
Exit Function
End If
If nDotIndex > Len( sString ) - 2 Then
Exit Function
End If
IsValidEmail = True
End Function
If IsValidEmail(str8) = True Then
response.write("Adresse Ok")
response.write("<BR>")
response.write str8
else
response.write("Adresse invalide")
response.write("<BR>")
response.write Request.Form("adressemail")
End If
%>