Luciani Massimiliano
a- a+

Convalidare indirizzo email

<%'##################################'#Come convalidare un indirizzo'#E-Mail'##################################Function MailCorretta(strMail)  If Len(strMail) > 6 Thenpos = Instr(1, strMail, "@")If pos >= Len(strMail) - 3 Then    Exit FunctionEnd If  If pos < 2 Then    Exit FunctionEnd If    dotpos = Instr(pos + 1, strMail, ".")If dotpos > Len(strMail) - 2 Then    Exit FunctionEnd If  If Len(Mid(strMail, pos + 1)) < 5 Or dotpos = 0 Then    Exit FunctionEnd IfMailCorretta = TrueElse  MailCorretta = False  End IfEnd FunctionstrMail = "webmaster@byluciani.com"If MailCorretta(strMail) Then    Response.Write strMail & " è una E-Mail valida"Else    Response.Write strMail & " NON è una E-Mail valida"End If%>