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 6861845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:35:15+00:00 2026-05-27T02:35:15+00:00

When I connect to pop3.live.com the connection is fine and it also shows me

  • 0

When I connect to pop3.live.com the connection is fine and it also shows me the amount of messages I have and the size of the file but when I try and use “RETR” to get the messages and show them on a console application nothing is presented.

Here is what I have so far

 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 " + _username);
                            sw.Flush();
                            sw.WriteLine("PASS "+ _password);
                            sw.Flush();
                            sw.WriteLine("LIST");
                            sw.Flush();
                            sw.WriteLine("RETR");
                            sw.Flush();
                            sw.WriteLine("QUIT ");
                            sw.Flush();

                            while ((strTemp = sr.ReadLine()) != null)
                            {
                                if (strTemp == "." || strTemp.IndexOf("-ERR") != -1)
                                {
                                    break;
                                }
                                str += strTemp;
                            }
                        }
                    }
                }
            }
            Console.WriteLine(str);
            Console.ReadLine();
  • 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-27T02:35:15+00:00Added an answer on May 27, 2026 at 2:35 am

    First you have to use the LIST command, which lists the message numbers. Then issue one or more RETR commands with a single message number from the previous list. Message numbers does not necessarily start from 1! See also my comment on your question about debugging this issue.

    For example:

    LIST
    +OK 2 messages (4095)
    1 710
    2 3385
    .
    RETR 1
    +OK 710 octets
    Return-Path: <john@example.com>
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using OpenSSL to connect to mail server. POP3 works fine but I have
Im trying to connect to a POP3 server via imap_open imap_open('{mail.domain.com:995/pop3/tls}INBOX', 'user@domain.com', 'password'); But
I connect to my email box vie POP3 and get unread messages count. There're
I am using Peter Huber's POP3 client to connect to gmail and download messages.
I have managed to: Connect to Gmail.com POP server (pop.gmail.com) Port 995 using Socket
I connect to Dynamics AX 2012 via Citrix. Everything works fine but in some
When writing a connection to connect to the POP3 protocol through sockets, I could
I am trying to connect gmail using C# pop3 but it give an error
I'm trying to connect to the pop3-server with php. Here is my code: $pop3Server
I have a third party application that requires a 'POP 3 connection string'. I'd

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.