This content has been marked as final.
Show 4 replies
-
1. Re: Jboss mail-service.xml localhost, port 25
tbottger Aug 30, 2006 8:16 AM (in response to ypasmk)Something to check is that you don't have a virus scanner on this machine that is blocking port 25 from mass emails. I ran into this problem on our server and it prevented all emails from going out. Once I disabled this on this server, everything was fine.
-
2. Re: Jboss mail-service.xml localhost, port 25
ypasmk Aug 31, 2006 2:04 AM (in response to ypasmk)well the problem seems to be in bounding the mbean. Here is the code for my RegisterMessage
@Resource(mappedName="java:/Mail") Session mailSession; public Message UAIMessage(User user) { try { Message message = new MimeMessage(getMailSession()); InternetAddress to[] = new InternetAddress[1]; to[0] = new InternetAddress(user.getEmail()); message.setRecipients(Message.RecipientType.TO, to); message.setSubject("UAI_sys Registration information"); message.setContent(RegisterContent(user), "text/plain"); //person.get return message; }catch(Exception e) { return null; } }
By debuging this I get that mailSession is always null. When jboss starts I get that mail service is bound to java:/Mail so I can't understand why it's null -
3. Re: Jboss mail-service.xml localhost, port 25
lafr Sep 26, 2006 3:42 PM (in response to ypasmk)Do you still get the error message with localhost ?
What do oyou get if you execute "nslookup smtp.test.com" on the server running jboss. -
4. Re: Jboss mail-service.xml localhost, port 25
ypasmk Sep 26, 2006 4:06 PM (in response to ypasmk)actually when I'm using
@Resource(mappedName="java:/Mail")
the mailsession is always null.
if I useInitialContext ctx = new InitialContext(); mailSession=(Session)ctx.lookup("java:/Mail");
everything is fine..so I guess there must be something wrong with this annotation or I really don't know