正在阅读 pop3 电子邮件,为什么没有收到已读电子邮件?
我正在使用 C# 并使用 OpenPop.net 库从我的 Web 域读取电子邮件。
它正在读取电子邮件,但只收到新电子邮件。我想让它像 hotmail 一样,它应该获取已读和未读的信息,然后使用 CSS 我将以不同的方式显示它们。请指导我该怎么做。
谢谢
I'm reading emails from my web domain in C# and using OpenPop.net library.
It is reading email but it only get emails that are new. I want to make it like hotmail that it should fetch read and unread both then using CSS I will display them differently. Please guide me how I can do it.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
POP3 不是像 IMAP 那样的存储系统。
当您从 POP3 收到邮件时,它通常会从服务器中删除该电子邮件(永远)。这就是它的工作原理。
也许 OpenPOP 中有一个选项允许人们在检索后不删除服务器上的电子邮件。
POP3 is not a storage system like IMAP.
When you get mail from POP3 it normally deletes the email from the server (forever). That's just how it works.
Perhaps there is an option in OpenPOP that allows one not to delete the emails on the server after retrieval.
编辑:
我猜您正在尝试使用 POP3 从 gmail 检索邮件。 Gmail 有一些奇怪的非标准 POP3 行为。 Gmail 将隐藏已检索到的邮件并忽略 POP3 DELE 命令。
请参阅此相关问题 有关此行为的更多信息。
Openpop 示例之一展示了如何检索所有消息:
Edit:
I'm guessing you're trying to retrieve mail from gmail using their POP3. Gmail has some weird non-standard POP3 behaviour. Gmail will hide messages that have been retrieved and ignores the POP3 DELE command.
See this related question for more information on this behaviour.
One of the Openpop examples shows how to retrieve all messages:
因为 POP 标准行为是:
,而 IMAP 标准行为是:
只要您的 POP 库足够低级,您就可以随时更改该行为。
Because the POP standard-behaviour is:
while the IMAP standard-behaviour is:
You can always alter that behavior, given your POP library is sufficiently low-level.
您可以做的是,当您从 smtp 服务器获取电子邮件时,将所有电子邮件写入数据库,这样下次您打开应用程序时,您仍然可以阅读所有电子邮件。
通常邮件服务器会在客户端收到邮件后删除邮件(在 Outlook 和其他邮件客户端中,有一个特定的设置来打开/关闭此功能,也许 OpenPop lib 也有一个设置)
What you could do is write all emails to a database when you fetch them from the smtp server, so next time you open your application you can still read the all emails.
Usually mail servers delete the mail when a client has received it (in outlook, and other mail clients, there is a specific setting to turn this on/off, maybe OpenPop lib also has a setting for this)