Aqui tienes la función que utilizo yo para validar que el email que nos introduce el usuario en nuestras aplicaciones es correcto.
'Función que comprueba si un e-mail es válido. Devuelve:
' 0 -> si es nulo o esta vacío
' 1 -> Si el e-mail es incorrecto
' 2 -> Si el e-mail es válido
Function Validar_EMail(EMail) as Integer
Dim Con as Integer
EMail = Trim(EMail)
If EMail = "" Then
Validar_EMail = 0
Exit Function
End If
EMail = LCase(EMail)
If (Left(EMail, 1) = "." Or Left(EMail, 1) = "@") Then
Validar_EMail = 1
Exit Function
End If
If (Right(EMail, 1) = "." Or Right(EMail, 1) = "_" Or _
Right(EMail, 1) = "@") Then
Validar_EMail = 1
Exit Function
End If
Con = 0
For i = 1 To Len(EMail)
If (Mid(EMail, i, 1)) = "@" Then
Con = Con + 1
End If
Next
If Con > 1 Or Con = 0 Then
Validar_EMail = 1
Exit Function
End If
Con = 0
For i = 1 To Len(EMail)
If (Mid(EMail, i, 1)) = "@" Then
For j = i To Len(EMail)
If (Mid(EMail, j, 1)) = "." Then
Con = Con + 1
End If
Next
End If
Next
If Con < 1 Then
Validar_EMail = 1
Exit Function
End If
Con = 0
For i = 1 To Len(EMail)
If (Mid(EMail, i, 1) = ".") Or (Mid(EMail, i, 1) = "@") Then
If (Mid(EMail, i + 1, 1) = ".") Or (Mid(EMail, i + 1, 1) = "@") Then
Validar_EMail = 1
Exit Function
End If
End If
Next
For i = 1 To Len(EMail)
If (Mid(EMail, i, 1) < "a" Or Mid(EMail, i, 1) > "z") And _
(Mid(EMail, i, 1) < "0" Or Mid(EMail, i, 1) > "9") And _
Mid(EMail, i, 1) <> "." And Mid(EMail, i, 1) <> "_" And _
Mid(EMail, i, 1) <> "-" And Mid(EMail, i, 1) <> "@" Then
Validar_EMail = 1
Exit Function
End If
Next
Validar_EMail = 2
End Function
Un saludo.