简体   繁体   English

Javamail Pop3会话超时?

[英]Javamail Pop3 Session timeout?

I'm trying to use javamail to download a mailbox of 1000 messages of hotmail. 我正在尝试使用javamail下载1000条hotmail消息的邮箱。 The problem is after an hour or so, I get a Pop Session timeout exception, and I can't fetch messages anymore. 问题是一个小时左右后,我收到了Pop Session超时异常,无法再获取消息了。

C: TOP 3210 0
S: +OK 1444 byte(s)
X-Message-Delivery: Vj0zLjQuMDt1cz0wO2k9MDtsPTA7YT0x
X-Message-Status: n:0
X-SID-PRA: Super Wall <apps+ocdlfcez@facebookmail.com>
X-SID-Result: Pass
X-Message-Info: R00BdL5giqoqgO8FeGWl8Lch6n3is6BT1wNitKPj0Jb+fghk1p9MsC+MFGyB2nflerotq/xZ5r8LiguM+3GjEOSj3umkoXeU
Received: from mx-out.facebook.com ([204.15.20.140]) by bay0-mc7-f15.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668);
     Tue, 8 Apr 2008 15:14:55 -0700
Received: from api.facebook.com (intlb01-mip1.sctm.tfbnw.net [10.1.240.6])
    by mx-out.facebook.com [email018.sctm.facebook.com] (8.13.6/8.13.6) with ESMTP id m38MEtOg030239
    for <xgameprogrammer@hotmail.com>; Tue, 8 Apr 2008 15:14:55 -0700
X-Facebook: from zuckmail ([168.143.164.188]) 
    by api.facebook.com with HTTP (ZuckMail);
Date: Tue, 8 Apr 2008 15:14:55 -0700
To: Ahmed Saleh <xgameprogrammer@hotmail.com>
From: Super Wall <apps+ocdlfcez@facebookmail.com>
Reply-to: Facebook <apps+ocdlfcez@facebookmail.com>
Subject: You just received a new photo from Lejla Boric
Message-ID: <03df95f3306af0a88432e7fcca22f7ac@api.facebook.com>
X-Priority: 3
X-Mailer: ZuckMail [version 1.00]
X-Facebook-Notify: platform_email
Errors-To: apps+ocdlfcez@facebookmail.com
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_03df95f3306af0a88432e7fcca22f7ac"
Return-Path: apps+ocdlfcez@facebookmail.com
X-OriginalArrivalTime: 08 Apr 2008 22:14:55.0926 (UTC) FILETIME=[F9D6A560:01C899C5]


.
C: RETR 3210
S: -ERR POP3 session timed out
javax.mail.MessagingException: No inputstream from datasource;
SentDate : Wed Apr 09 01:14:55 AST 2008
  nested exception is:

As I said in my comment, this is just a simple case of the session timing out. 正如我在评论中所说,这只是会话超时的简单情况。 Like anything, the mail server will have a time limit to prevent excessive access, which is how would describe downloading emails for over an hour! 像其他任何东西一样,邮件服务器将有一个时间限制以防止过度访问,这就是一个多小时的电子邮件下载方式!

There is nothing wrong with your code, your just asking too much of hotmail / the mail server! 您的代码没有错,您只是问了太多的hotmail /邮件服务器!

Though, just some friendly advice: the next time you ask a question here on SO, please don't post irrelevant information like you have done here. 不过,只是一些友善的建议:下次您在SO上问一个问题时,请不要像在此处那样发布无关的信息。 In cases like yours, it is helpful to see atleast a snippet of the code that is responsible for that part of the application that is functioning incorrectly and any exceptions - we'd also need to see the line(s) of code mentioned in the stack trace... However, a start would be to actually ask a question instead of this stating a fact, like you have done here! 在像您这样的情况下,查看至少一部分代码是很有用的,这部分代码负责应用程序中无法正常运行的部分以及任何异常-我们还需要查看代码中提到的代码行堆栈跟踪...但是,一个开始实际上是问一个问题,而不是像在这里所做的那样陈述事实!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM