寻找新的电子邮件的实时IMAP通知 [英] Looking for a real-time IMAP notification of new Emails

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

问题描述

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



有没有人知道具有此功能的IMAP库?还是有另一种方法可以立即通知新消息而不进行一些短期轮询?

解决方案

您需要处理< a href =http://www.isode.com/whitepapers/imap-idle.html =noreferrer> IMAP IDLE 。



这将在新的邮件到达时通知您,而不会有不断的轮询(这是不好的)。






一个非常好的商业广告。 NET IMAP库是 MailBee.Net 。我曾经把它用于一个小项目,似乎处理得很好,并且很容易使用。可能还有其他的 - 只需在您的库中搜索发送IDLE命令或IDLE命令处理,您可能会发现某些东西。


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.

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?

解决方案

You need to handle IMAP IDLE.

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


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通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆