Reading an email using gmail pop3 server from telnet (using stunnel) in windows.

Last time, I showed how to send an email using a gmail account and gmail’s smtp server,

Now it’s time to login to our inbox and read the email using gmail’s pop3 server and stunnel.

First let’s configure stunnel, I will listen on port 2302, and gmail’s pop3 server is pop.gmail.com port: 995

so in stunnel.conf we write the following:
[pop3s]
accept  = 2302
connect = pop.gmail.com:995

for more info about configuring stunnel, please refer to my other post Sending an email using gmail smtp server from telnet (using stunnel) in windows,

After starting or reloading stunnel, let’s start the command line cmd:

in cmd, write the following:
telnet localhost 2302

 

+OK Gpop ready for requests from xxx.xxx.xxx.xxx eq6pf732841wbb.2

USER [email protected]
+OK send PASS
PASS YourPassword
+OK Welcome.
STAT
+OK 107 2614891
LIST
+OK 107 messages (2614891 bytes)

1 2989
2 3352
3 3029
4 3240
5 844
.
.
.

103 13741
104 31400
105 170674
106 123019
107 13170
RETR 91
Content of the message will be displayed here
QUIT
Connection to host lost.

USER the gmail address… (can be without @gmail.com)
PASS the password
STAT will list the number of messages you have and its size in bytes.
LIST will show the list of all the messages, their number and their size.
RETR “#Number” will retrieve the message number.
QUIT will disconnect you from the server.

You can also use DELE  “#Number” to delete a message, and RSET to restore all the message that was deleted, but make sure you use RSET before using QUIT, or the messages can’t be restored later.

5 thoughts on “Reading an email using gmail pop3 server from telnet (using stunnel) in windows.”

  1. Yes man. It`s still working. I am tried too. It`s cool man. It is work on another servers, just you need to now correctly address.

  2. SSL_accept: 140760FC: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol

    i got this error in stunnel when i try telnet to localhost.

    Im unable to telnet to gmail server on 995 too..
    any suggestions.?

Leave a Reply

Your email address will not be published. Required fields are marked *