ItGo.me Focus on IT Recommend

Home > c# - Pop3 and gmail email deleted after download

c# - Pop3 and gmail email deleted after download

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
入口地址https://www.aliyun.com/minisite/goods

I Am writing Pop3 client for gmail. The problem is that when the email is downloaded then it deletes from pop3 server. I have tried sending RSET command to server but it dose not work.

Do i have to send RSET just before disconnecting or after downloading each mail?

c# gmail pop3 gmail-pop
|
  this question
edited Jul 27 '10 at 9:07 JLWarlow 2,375 1 19 43 asked Jul 13 '10 at 7:36 Woland 593 2 15 34

 | 

5 Answers
5

It should only delete the messages if you send/use the DELE command. Since you're writing it yourself.. simply do not use the DELE command: http://www.faqs.org/rfcs/rfc1939.html

The RSET command should also work, too, see from the RFC linked:

RSET

     Arguments: none

     Restrictions:
         may only be given in the TRANSACTION state

     Discussion:
         If any messages have been marked as deleted by the POP3
         server, they are unmarked.  The POP3 server then replies

         with a positive response.

     Possible Responses:
         +OK

     Examples:
         C: RSET
         S: +OK maildrop has 2 messages (320 octets)


|
  this answer
answered Jul 13 '10 at 7:48 Kieren Johnstone 27.1k 9 57 109      DEL is newer send to server and i send RSET just before Quit command but next time i check Pop3 list there is no mail. –  Woland Jul 13 '10 at 8:00      I have tried other pop3 server and it seems that it's google issue. –  Woland Jul 13 '10 at 8:04

 | 

Gmail's POP3 configuration maybe sometimes confusing. In the Gmail's web interface in "Settings" on "Forwarding and POP/IMAP" tab you can find a drop down list called "When messages are accessed with POP".

Here's the value list and the Gmail's behavior:

a. "delete Gmail's copy": Message is deleted by issuing RETR command.

b. "keep Gmail's copy in the Inbox": Message stays in the Inbox, Web interface says it's unread, however message is not received for the second time using POP3 client.

c. "archive Gmail's copy": Message is deleted by issuing RETR command, however it is possible to find it using web interface.

Recommend:c++ - Reading emails from gmail POP3 account using libCurl

ead emails from an gmail POP3 account just like the title says. Also is important to say that i need to download the attachments (is encode base64) of the mail and its body. The fact is that everyone recommend to use libCurl for this task,

Gmail simply ignores DELE command, and does not follow POP3 standard.


|
  this answer
answered Sep 4 '10 at 12:18 Pawel Lesnikowski 4,908 3 27 35

 | 

Google doesn't handle POP3 in a conventional sense. Once you have downloaded a mail then it is flagged as downloaded and POP3 will act like it has been deleted. But in reality they keep a copy of the mail on the server.


|
  this answer
answered Jul 26 '10 at 9:31 Chris Diver 12.7k 1 29 51

 | 

It has been some time, but working on a similar problem, i found out that the TOP command does not mark the message as read within GMail POP3 server.

So, if you do not read the message entirely, you can surely read it back later.

Hope it helps.


|
  this answer
answered Dec 17 '10 at 23:34 RobsonROX 307 4 20

 | 

Because Gmail POP3 server doesn't work like normal POP3 server, it hides old emails automatically even the email was not deleted by POP3 DELE command.

If you want to read all emails from Gmail mailbox, you can try to implement or find a IMAP4 client. I can use IMAP4 to read all emails in Gmail mailbox.


|
  this answer
answered Jul 11 '13 at 9:22 Jenny 1985 36 3

 | 

Recommend:pop3 - How to download an email from gmail

count because the pop server is accessed through SSL on port 995. >> pop: open/lines ssl://pop.gmail.com:995>> set-modes pop [secure: true]>> print first pop+OK Gpop ready for requests from 213.240.224.162 7mb34713954eem>> insert pop "u

oriUlr:http://stackoverflow.com/questions/3235047/pop3-and-gmail-email-deleted-after-download

------splitte line----------------------------