且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Javamail事件侦听器没有得到任何事件

更新时间:2023-11-19 11:12:13

首先,这是一个非常老版本的JavaMail。您应该升级到当前版本,以防它与您的问题有关

Well, first of all, that's a very old version of JavaMail. You should upgrade to the current version, just in case it has something to do with your problem.

另外,通过在while循环中包含store.isConnected(),您迫使JavaMail创建另一个连接到您的服务器。这可能不是你需要的。

Also, by including "store.isConnected()" in your while loop, you're forcing JavaMail to create another connection to your server. That's probably not something you need.

什么产生停止侦听器消息?这是来自听众本身吗?有些东西正在中止IDLE命令并关闭文件夹和存储,但是您的代码不清楚是什么导致的。

What produces the "stopping listener" message? Is that coming from the listener itself? Something is aborting the IDLE command and closing the Folder and Store, but it's not clear from your code what's causing that.

这是一个独立的Java程序吗?还是在应用程序服务器中运行?

Is this a standalone Java program? Or is it running in an application server?