smtp/POP and the internet

I've been trying to find out how to access email servers or files over the internet in c++, but with no luck. I don't know how to do it.I have been searching for a while now.Maybe DLL's? Or using calling windows functions?? I don't have a clue. Can anyone help me?? Or give me link or whatever. I would be very grateful. Thankyou.

ok. I don't mean to sound dumb, but what do i do with that 'snippet'? Where do i put it in my program?? So, i just put in my code "nslookup -querytype=mx msn.com"?? Sorry, but i do not comprehend what you are trying to say.