peak said:
I need to obtain the ip from an email address, any ideas?
strip out the domain name from the email address:
(untested - watch for typos, syntax, etc - directly typing in here..)
' this should give you mydomain.com
Dim strEmail As String = "(e-mail address removed)"
Dim strDomain As String = _
strEmail.SubString(strEmail.IndexOf("@"c)+1, _
strEmail.Length - strEmail.IndexOf("@"c))
Then use the methods in System.Net.Dns class to retrieve the IP address:
For Each ip As System.Net.IPAddress _
In System.Net.Dns.GetHostByName(strDomain).AddressList
MessageBox.Show(ip.ToString)
Next ip
Note that a domain could have multiple IP addresses associated with it which
is why we need the loop.
hope that helps..
Imran.