Your code seems ok. Have you updated the mail-service.xml to your environment (meaning host of the SMTP server if you want to send email)?
Post the definition of your mail-service.xml Regards, Stephane -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 10:34 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] using mail datasource Hallo, for what I can use datasource defined in mail-service.xml? Can I use it for sending mail or I must send mail by another way? I tried to use it as : Context initCtx = new InitialContext(); session = (Session)initCtx.lookup("java:/Mail"); mailMsg = new MimeMessage(session); ... Transport transport = session.getTransport(); transport.sendMessage(mailMsg, addresses); But it does not work. It is not possible to use it for sending or I have some mistake? ... Thanks, Jiri ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user