my mail-service is: <server> <classpath codebase="lib" archives="mail.jar, activation.jar, mail-plugin.jar"/>
<mbean code="org.jboss.mail.MailService" name="jboss:service=Mail"> <attribute name="JNDIName">java:/Mail</attribute> <attribute name="User"></attribute> <attribute name="Password"></attribute> <attribute name="Configuration"> <!-- Test --> <configuration> <!-- Change to your mail server prototocol --> <property name="mail.store.protocol" value="pop3"/> <property name="mail.transport.protocol" value="smtp"/> <!-- Change to the user who will receive mail --> <property name="mail.user" value="[EMAIL PROTECTED]"/> <!-- Change to the mail server --> <property name="mail.pop3.host" value="172.26.0.21"/> <!-- Change to the SMTP gateway server --> <property name="mail.smtp.host" value="172.26.0.21"/> <!-- Change to the address mail will be from --> <property name="mail.from" value="[EMAIL PROTECTED]"/> <!-- Enable debugging output from the javamail classes --> <property name="mail.debug" value="true"/> </configuration> </attribute> </mbean> </server> > 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 > ------------------------------------------------------- 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