[jboss-user] [Installation, Configuration & Deployment] - Re: Jboss mail-service.xml localhost, port 25
koriel
do-not-reply at jboss.com
Thu Aug 31 02:04:31 EDT 2006
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968529#3968529
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968529
More information about the jboss-user
mailing list