{"id":92,"date":"2010-11-02T22:23:00","date_gmt":"2010-11-02T22:23:00","guid":{"rendered":"https:\/\/www.tech-and-dev.com\/blog\/2010\/11\/02\/reading-an-email-using-gmail-pop3-server-from-telnet-using-stunnel-in-windows\/"},"modified":"2021-02-22T00:54:17","modified_gmt":"2021-02-22T00:54:17","slug":"reading-email-using-gmail-pop3-server","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2010\/11\/reading-email-using-gmail-pop3-server.html","title":{"rendered":"Reading an email using gmail pop3 server from telnet (using stunnel) in windows."},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/gmail-logo.png\"><img decoding=\"async\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/gmail-logo.png\" border=\"0\" \/><\/a><\/div>\n<p>Last time, I showed how to send an email using a gmail account and gmail&#8217;s smtp server,<\/p>\n<p>Now it&#8217;s time to login to our inbox and read the email using gmail&#8217;s pop3 server and stunnel.<\/p>\n<p>First let&#8217;s configure stunnel, I will listen on port 2302, and gmail&#8217;s pop3 server is pop.gmail.com port: 995<\/p>\n<p>so in stunnel.conf we write the following:<br \/>\n<span style=\"color: #444444;\">[pop3s]<\/span><br \/>\n<span style=\"color: #444444;\">accept\u00a0 = 2302<\/span><br \/>\n<span style=\"color: #444444;\">connect = pop.gmail.com:995<\/span><\/p>\n<p>for more info about configuring stunnel, please refer to my other post <a href=\"http:\/\/www.etiennerached.com\/2010\/10\/sending-email-using-gmail-smtp-server.html\">Sending an email using gmail smtp server from telnet (using stunnel) in windows<\/a>,<\/p>\n<p>After starting or reloading stunnel, let&#8217;s start the command line cmd:<\/p>\n<p>in cmd, write the following:<br \/>\n<b>telnet localhost 2302<\/b><\/p>\n<p>&nbsp;<\/p>\n<div style=\"color: red;\">+OK Gpop ready for requests from <i>xxx.xxx.xxx.xxx<\/i> eq6pf732841wbb.2<\/div>\n<p><span style=\"color: blue;\">USER etienne.rached@gmail.com<\/span><br \/>\n<span style=\"color: red;\">+OK send PASS<\/span><br \/>\n<span style=\"color: blue;\">PASS <\/span><i style=\"color: blue;\">YourPassword<\/i><br \/>\n<span style=\"color: red;\">+OK Welcome.<\/span><br \/>\n<span style=\"background-color: blue; color: blue;\"><span style=\"background-color: white;\">STAT<\/span><\/span><br \/>\n<span style=\"color: red;\">+OK 107 2614891<\/span><br \/>\n<span style=\"color: blue;\">LIST<\/span><br \/>\n<span style=\"color: red;\">+OK 107 messages (2614891 bytes)<\/span><\/p>\n<div style=\"color: red;\">1 2989<br \/>\n2 3352<br \/>\n3 3029<br \/>\n4 3240<br \/>\n5 844<\/div>\n<div style=\"color: red;\">.<\/div>\n<div style=\"color: red;\">.<\/div>\n<div style=\"color: red;\">.<\/div>\n<p><span style=\"color: red;\">103 13741<\/span><br \/>\n<span style=\"color: red;\">104 31400<\/span><br \/>\n<span style=\"color: red;\">105 170674<\/span><br \/>\n<span style=\"color: red;\">106 123019<\/span><br \/>\n<span style=\"color: red;\">107 13170<\/span><br \/>\n<span style=\"color: blue;\">RETR 91<\/span><br \/>\n<span style=\"color: #38761d;\">Content of the message will be displayed here<\/span><br \/>\n<span style=\"color: blue;\">QUIT<\/span><br \/>\n<span style=\"color: blue;\">Connection to host lost.<\/span><\/p>\n<p><b>USER<\/b> the gmail address&#8230; (can be without @gmail.com)<br \/>\n<b>PASS<\/b> the password<br \/>\n<b>STAT <\/b>will list the number of messages you have and its size in bytes.<br \/>\n<b>LIST<\/b> will show the list of all the messages, their number and their size.<br \/>\n<b>RETR &#8220;#Number&#8221;<\/b> will retrieve the message number.<br \/>\n<b>QUIT<\/b> will disconnect you from the server.<\/p>\n<p>You can also use <b>DELE<\/b>\u00a0<b> &#8220;#Number&#8221;<\/b> to delete a message, and <b>RSET<\/b><b> <\/b>to restore all the message that was deleted, but make sure you use <b>RSET<\/b> before using <b>QUIT<\/b>, or the messages can&#8217;t be restored later.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Last time, I showed how to send an email using a gmail account and gmail&#8217;s smtp server, Now it&#8217;s time to login to our inbox and read the email using gmail&#8217;s pop3 server and stunnel. First let&#8217;s configure stunnel, I will listen on port 2302, and gmail&#8217;s pop3 server is pop.gmail.com port: 995 so in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,14,130,129,128],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-email","category-gmail","category-pop3","category-stunnel","category-telnet"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":1,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}