开发者

Download Gmail Messages One by One

开发者 https://www.devze.com 2023-04-13 06:05 出处:网络
I need a .net IMAP Library that downloads the messages in a gmail folder one by one not all at once. That\'s because when I connect to the gmail account and try to download the messages in a folder,

I need a .net IMAP Library that downloads the messages in a gmail folder one by one not all at once.

That's because when I connect to the gmail account and try to download the messages in a folder, the application hangs until all the messages in that folder are downloaded into the memory so that if the connection disconnected开发者_开发百科, the whole process fails.


Any decent IMAP client allows you download 1 message at time. Normally you should only get only 1 message at time, otherwise if thousands of messages, you run out of memory.

It depens on application, if you run UI apllication, you should run IMAP on different thread, to keep UI not freezing.


To improve user expreience, you may want to download only basic message info (subject, from, to, attachment count) first to fill the list.

ENVELOPE and BODYSTRUCTURE are the IMAP commands for that.

You can try Mail.dll IMAP component for that: http://www.lesnikowski.com/blog/index.php/get-email-information-from-imap-fast/

Please note the Mail.dll is a commercial product I created.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号