views:

170

answers:

1

hello everrbody

i am developing a website in wich i want to connect to hotmail server to read and send emails through my website but i am not able to connect to server..i am using pop3 and smtp i am getting error as below

[System.Net.Sockets.SocketException] = {"The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for"}

StackTrace = " at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)\r\n at System.Net.Dns.Resolve(String hostName)\r\n at Pop3.Pop3Client.GetClientSocket() in C:\Documents and Settings\DST\My Documents\Visual Studio 2008\Projects\hot...

TargetSite = {System.Net.IPHostEntry InternalGetHostByName(System.String, Boolean)}

i am gettin this error when i call a function as

IPHostEntry hostEntry = null;

    hostEntry = Dns.Resolve(m_credential.Server);

please help me to solve this problem

+1  A: 

Looks to me like you might be way off from your goal and perhaps making things much too complicated than necessary. Sending email from .Net via the SmtpClient class is a fairly simple process. Have a look here.

Here is a nice-looking tutorial for sending email via SmtpClient.

And here is a sample for reading pop3 email from Gmail (should be easy to change to Hotmail.)

Good luck!

Paul Sasik