GMAIL API - 检查新邮件的最快方法 [英] GMAIL API - Quickest method to check for new Mail

查看:174
本文介绍了GMAIL API - 检查新邮件的最快方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过电子邮件收到一些优惠。有一个比赛首先得到它。
他们发送一封内含验证码的电子邮件。



哪种解决方案最好检查新Gmail邮件并尽快获得新邮件正文?



我听说过


  • IMAP IDLE ..足够快吗?

  • POP3是否更好地通过POP3连续检查新邮件?


解决方案

最快的方法是 IMAP 清楚


允许客户向服务器表明它已准备好
接受实时通知。
IDLE命令的基本网络使用非常小,因此它
可以非常有效地使用带宽

一个好的IMAP服务器对于一个空闲连接的开销会很小,并且它支持10或100的数千个连接。 b
$ b

另一个实际问题是目前的电话网络技术将不时失去IP网络连接,这将需要自动重新建立,并重新建立
$ b


IMAP连接如果由于长时间的网络
失败而丢失这些信息。



I'm getting some offers by emails. And there is a competition who get it first. They send an email with a verification code inside.

Which solution is best to check for new gmail messages and get new message body ASAP?

I heard about

  • IMAP IDLE.. is that quick enough?
  • POP3 is it better to check for new messages via POP3 continuously?

解决方案

The fastest method would be IMAP clearly

it allows a client to indicate to the server that it is ready to accept real-time notifications. The basic network use of the IDLE command is very small, and so it makes very efficient use of bandwidth

A good IMAP server will have minimal overhead for an Idle connection, and it support 10’s or 100’s of thousands of connections.

Another practical problem is that current phone networking technology will lose IP network connectivity from time to time, and this will need to be automatically re-established, and the

IMAP connection re-established if this is lost due to a long network failure.

这篇关于GMAIL API - 检查新邮件的最快方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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