Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 671803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:24:50+00:00 2026-05-14T00:24:50+00:00

I’m trying to read mails from my live.com account, via the POP3 protocol. I’ve

  • 0

I’m trying to read mails from my live.com account, via the POP3 protocol.

I’ve found the the server is pop3.live.com and the port if 995.

I’m not planning on using a pre-made library, I’m using NetworkStream and StreamReader/StreamWriter for the job. I need to figure this out. So, any of the answers given here: Reading Email using Pop3 in C# are not usefull.

It’s part of a larger program, but I made a small test to see if it works. Eitherway, i’m not getting anything. Here’s the code I’m using, which I think should be correct.

EDIT: this code is old, please refer to the second block problem solved.

public Program() {
    string temp = "";
    using(TcpClient tc = new TcpClient(new IPEndPoint(IPAddress.Parse("127.0.0.1"),8000))) {
        tc.Connect("pop3.live.com",995);
        using(NetworkStream nws = tc.GetStream()) {
            using(StreamReader sr = new StreamReader(nws)) {
                using(StreamWriter sw = new StreamWriter(nws)) {
                    sw.WriteLine("USER " + user);
                    sw.Flush();
                    sw.WriteLine("PASS " + pass);
                    sw.Flush();
                    sw.WriteLine("LIST");
                    sw.Flush();
                    while(temp != ".") {
                        temp += sr.ReadLine();
                    }
                }
            }
        }
    }
    Console.WriteLine(temp);
}

Visual Studio debugger constantly falls over tc.Connect("pop3.live.com",995); Which throws an “A socket operation was attempted to an unreachable network 65.55.172.253:995” error.

So, I’m sending from port 8000 on my machine to port 995, the hotmail pop3 port.
And I’m getting nothing, and I’m out of ideas.


Second block: Problem was apparently that I didn’t write the quit command.

The Code:

public Program() {
    string str = string.Empty;
    string strTemp = string.Empty;
    using(TcpClient tc = new TcpClient()) {
        tc.Connect("pop3.live.com",995);
        using(SslStream sl = new SslStream(tc.GetStream())) {
            sl.AuthenticateAsClient("pop3.live.com"); 
            using(StreamReader sr = new StreamReader(sl)) {
                using(StreamWriter sw = new StreamWriter(sl)) {
                    sw.WriteLine("USER " + user);
                    sw.Flush();
                    sw.WriteLine("PASS " + pass);
                    sw.Flush();
                    sw.WriteLine("LIST");
                    sw.Flush();
                    sw.WriteLine("QUIT ");
                    sw.Flush();

                    while((strTemp = sr.ReadLine()) != null) {
                        if(strTemp == "." || strTemp.IndexOf("-ERR") != -1) {
                            break;
                        }
                        str += strTemp;
                    }
                }
            }
        }
    }
    Console.WriteLine(str);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:24:50+00:00Added an answer on May 14, 2026 at 12:24 am

    What happens if you view the Network Traffic using Wireshark? Is it sending anything at all?

    Edit: I can’t connect via telnet to pop3.live.com at that port either. Have you managed to successfully connect via a pop3 email client ever?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.