下载后删除 Pop3 和 Gmail 电子邮件

发布于 2024-09-09 01:46:46 字数 124 浏览 5 评论 0原文

我正在为 gmail 编写 Pop3 客户端。问题是,当电子邮件被下载后,它就会从 pop3 服务器中删除。我尝试向服务器发送 RSET 命令,但它不起作用。

我是否必须在断开连接之前或下载每封邮件之后发送 RSET?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

幼儿园老大 2024-09-16 01:46:46

如果您发送/使用 DELE 命令,它应该仅删除消息。由于您是自己编写的..只需不要使用 DELE 命令: http://www .faqs.org/rfcs/rfc1939.html

RSET 命令也应该可以工作,请参见 RFC 链接:


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)

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)

戏剧牡丹亭 2024-09-16 01:46:46

Gmail 的 POP3 配置有时可能会令人困惑。
在 Gmail 网络界面的“转发和 POP/IMAP”选项卡上的“设置”中,您可以找到一个名为“通过 POP 访问邮件时”的下拉列表。

以下是值列表和 Gmail 的行为


“删除 Gmail 的副本”
通过发出 RETR 命令来删除消息。

b.
“将 Gmail 的副本保留在收件箱中”
消息保留在收件箱中,
网络界面显示未读,但收到消息
第二次使用POP3客户端。

c.
“存档 Gmail 的副本”:
通过发出 RETR 命令删除消息,但它是
可以使用网络界面找到它。

Gmail 简单地忽略 DELE 命令,并且不遵循 POP3 标准。

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.

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

天邊彩虹 2024-09-16 01:46:46

Google 不处理传统意义上的 POP3。一旦您下载了邮件,它就会被标记为已下载,并且 POP3 将表现得就像它已被删除一样。但实际上他们在服务器上保留了邮件的副本。

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.

蘑菇王子 2024-09-16 01:46:46

已经有一段时间了,但是在处理类似的问题时,我发现 TOP 命令没有将邮件标记为在 GMail POP3 服务器中已读。

因此,如果您没有完整阅读该消息,您当然可以稍后再读一遍。

希望有帮助。

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.

梦在夏天 2024-09-16 01:46:46

由于 Gmail POP3 服务器不像普通 POP3 服务器那样工作,因此即使电子邮件没有被 POP3 DELE 命令删除,它也会自动隐藏旧电子邮件。

如果你想阅读Gmail邮箱中的所有邮件,可以尝试实现或者找一个IMAP4客户端。我可以使用IMAP4阅读Gmail邮箱中的所有电子邮件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文