|
Wednesday, November 14, 2007 |
| Check if an email address is from a valid domain |
|
Dim strEmail As String = "jimbale@apnzzz.com" strEmail = strEmail.Substring((strEmail.LastIndexOf("@") + 1), strEmail.Length - (strEmail.LastIndexOf("@") + 1)) Try Dim strTest As String = System.Net.Dns.GetHostEntry(strEmail).HostName Catch exNoHostException As System.Net.Sockets.SocketException 'Handle here when the email has an invalid domain Dim stT As String = "" Catch ex As Exception 'Handle unexpected errors here Dim stT As String = "" End Try |
jeremy at 10:44 AM |
(15) Comments |
Add a comment |
Permalink
|
|
|
|