On Sep 4, 5:58 pm, "John Wright" <riley_wri...@hotmail.comwrote:
I want to validate an email address against our Exchange server. Anyone
have code or point me in the right direction?
John
If you're not meaning domain validation, but format validation of mail
address, you can use Regex pattern to check if it's a valid e-mail
address:
'-----Begin-------
Imports System.Text.RegularExpressions
Dim pattern As String
' I hope pattern is proper
pattern = "\w+([-+.]\w)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
If Regex.IsMatch("mail_here", pattern) = True Then
MsgBox("Valid mail address!")
Else
MsgBox("Invalid mail address!")
End If
'-----End-------
Hope this helps,
Onur Güzel