Details
-
Bug
-
Resolution: Obsolete
-
Major
-
JBossAS-4.2.3.GA
-
None
Description
The
org.jboss.resource.adapter.mail.inflow.MailFolder calls javax.mail.Folder.hasNewMessages() to check for new messages.
POP3Folder instances allways return false on this request, see:
http://java.sun.com/products/javamail/javadocs/com/sun/mail/pop3/POP3Folder.html
A quick fix/work around:
public Message[] getNewMessages()
throws Exception
{
Message msgs[] = {};
/* This does not seem to be the most reliable new msg check. This should
probably be unread msgs with the msgs marked as read on successful
delivery.
*/
if( folder.hasNewMessages() )
// Special handling of POP3, hasNewMessages() always returns false.
if (protocol.equalsIgnoreCase("pop3"))
return msgs;
}