寻找新电子邮件的实时 IMAP 通知

时间:2022-12-03
本文介绍了寻找新电子邮件的实时 IMAP 通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来监控新电子邮件的 GMail 收件箱.但是,我想避免每隔几分钟检查一次,我正在寻找某种实时通知.我注意到 Outlook(和其他支持 IMAP 的客户端)会在有新电子邮件时立即显示,但不幸的是,所有 .NET IMAP 库似乎都缺少此功能.

I'm looking for a way to monitor a GMail inbox for new e-mails. However, I want to avoid checking every few minutes and I'm looking for some sort of real-time notification. I've noticed that Outlook (and other IMAP-supporting clients) instantly show when there is a new e-mail, but unfortunately all .NET IMAP libraries seem to lack this functionality.

有谁知道有这个功能的 IMAP 库吗?或者有没有另一种方法可以在不进行一些短期轮询的情况下立即收到新消息的通知?

Does anyone know of an IMAP library that has this functionality? Or is there another way to be instantly notified of new message without doing some short-period polling?

推荐答案

你需要处理IMAP 空闲.

这会在新消息到达时通知您,无需不断轮询(这很糟糕).

This will notify you when new messages arrive, without constant polling (which is bad).

一个非常好的商业 .NET IMAP 库是 MailBee.Net.不久前我将它用于一个小项目,它似乎处理得很好,并且相当容易使用.可能还有其他 - 只需在您的库中搜索发送 IDLE 命令或 IDLE 命令处理,您可能会找到一些东西.

A very good, commercial .NET IMAP library is MailBee.Net. I used it for a small project a while back, and it seemed to handle things very well, and be fairly easy to work with. There may be others - just search in your library for sending the IDLE command or IDLE command handling, and you'll likely find something.

这篇关于寻找新电子邮件的实时 IMAP 通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:用于订阅/发布 MQTT (Really Small Message Broker) 的 C# 下一篇:如何显示来自 Windows 服务的通知区域气球和图标

相关文章

最新文章