mail example no mails received
dreuzel Jan 25, 2008 11:16 AMI'm reading my mailbox
all properties seem to be setup correclty
@MessageDriven(activationConfig={ @ActivationConfigProperty(propertyName="mailServer", propertyValue="mail..net"), @ActivationConfigProperty(propertyName="mailFolder", propertyValue="INBOX"), @ActivationConfigProperty(propertyName="storeProtocol", propertyValue="pop3"),//pop3 @ActivationConfigProperty(propertyName="pollingInterval", propertyValue="60000"), //1000 is 1 second 60*60 each hour @ActivationConfigProperty(propertyName="flush", propertyValue="false"), //do not remove the info from the mail @ActivationConfigProperty(propertyName="debug", propertyValue="true"), //do not remove the info from the mail @ActivationConfigProperty(propertyName="userName", propertyValue="seamMailbox"), @ActivationConfigProperty(propertyName="password", propertyValue="pass") }) @ResourceAdapter("mail-ra.rar") //jboss-jca.jar annotation : org.jboss.annotation.ejb.* //It should be in $JBOSS_HOME/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar @Name("mailpoplistener") public class EmailPop implements MailListener { //email support include JBOSS-seam-mail.jar in WEB-INF/lib // or JBOSS JavaMail API lib/mail.jar (copy in activation.jar @Logger private Log log; @In(create=true) private Email email; @In(create=true) private Renderer render;//rendering email @In ("#{entityManager}") public EntityManager em;//allow for db ACCESS Exception ErrCod=null; String Env="Mail pop"; public void onMessage(Message message) { // Process the message // detect beursmessage else Forward for attention try{ Env="Get Email message"; log.info("mail from:"+message.getFrom()); log.info("mail from:"+message.getSubject()); log.info("mail from:"+message.getContentType()); log.info("mail from:"+message.getContent()); beursmail.process(message); } catch(Exception er) {ErrCod=er; String errmsg=er.getClass().getSimpleName() +" err: "+ er.getMessage(); log.error(Env+" Modifying timeout failed "+ errmsg); } }
but no mails are getting in and as flush is enabled ; all mails are cleared
in debug mode I see following :
DEBUG: JavaMail version 1.4ea 17:05:28,218 INFO [STDOUT] DEBUG: java.io.FileNotFoundException: C:\WINDOWS\programfiles\java\jre1.6.0_03\lib\javamail.providers (The system cannot find the file specified) 17:05:28,218 INFO [STDOUT] DEBUG: !anyLoaded 17:05:28,218 INFO [STDOUT] DEBUG: not loading resource: /META-INF/javamail.providers 17:05:28,218 INFO [STDOUT] DEBUG: successfully loaded resource: /META-INF/javamail.default.providers 17:05:28,218 INFO [STDOUT] DEBUG: Tables of loaded providers 17:05:28,218 INFO [STDOUT] DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]} 17:05:28,218 INFO [STDOUT] DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]} 17:05:28,218 INFO [STDOUT] DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map 17:05:28,218 INFO [STDOUT] DEBUG: !anyLoaded 17:05:28,218 INFO [STDOUT] DEBUG: not loading resource: /META-INF/javamail.address.map 17:05:28,218 INFO [STDOUT] DEBUG: java.io.FileNotFoundException: C:\WINDOWS\programfiles\java\jre1.6.0_03\lib\javamail.address.map (The system cannot find the file specified) 17:05:28,218 INFO [STDOUT] DEBUG: setDebug: JavaMail version 1.4ea 17:05:28,218 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc] 17:05:28,218 INFO [STDOUT] DEBUG POP3: connecting to host "mail..net", port 110, isSSL false 17:05:28,718 INFO [STDOUT] S: +OK POP3 server ready <2260.1201277145@(null)> 17:05:28,718 INFO [STDOUT] C: USER seamMailbox 17:05:28,718 INFO [STDOUT] S: +OK please send PASS command 17:05:28,718 INFO [STDOUT] C: PASS pass 17:05:28,734 INFO [STDOUT] S: +OK 23 messages (295250 octets) 17:05:28,734 INFO [STDOUT] C: STAT 17:05:28,734 INFO [STDOUT] S: +OK 23 295250 17:05:28,734 INFO [STDOUT] C: NOOP 17:05:28,734 INFO [STDOUT] S: +OK 17:05:28,875 INFO [STDOUT] C: NOOP 17:05:28,875 INFO [STDOUT] S: +OK 17:05:28,875 INFO [STDOUT] C: QUIT 17:05:28,906 INFO [STDOUT] S: +OK POP3 server signing off
23 messages are effectively available non are read
nor is onMessage triggered
nor any other error message
any idea's ?