[jboss-user] [Messaging, JMS & JBossMQ] - mail-service.xml - multiple smtp accounts

sandrocchio_0.1 do-not-reply at jboss.com
Fri Mar 16 11:05:08 EDT 2007


Hello there,
I'm developing a message driven bean able to send emails.
As I'm quite new with EJB3 and JBoss, I first looked for more informations about it and if I'm not wrong I need to configure the mail-service.xml file.
The question is:
can I set multiple smtp accounts? I mean, I probably need to use one account only for a particulary EJB module and not share it across the others applications deployed in JBoss.

the file now looks like this, can you give me an idea, if possible, on how to achieve what I'd like to.
Thanks in advance.

<server>
  | 
  |   <!-- ==================================================================== -->
  |   <!-- Mail Connection Factory                                              -->
  |   <!-- ==================================================================== -->
  | 
  |   <mbean code="org.jboss.mail.MailService"
  |          name="jboss:service=Mail">
  |     <attribute name="JNDIName">java:/Mail</attribute>
  |     <attribute name="User">nobody</attribute>
  |     <attribute name="Password">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="nobody"/>
  | 
  |           <!-- Change to the mail server  -->
  |           <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
  | 
  |           <!-- Change to the SMTP gateway server -->
  |           <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>
  | 
  |           <!-- Change to the address mail will be from  -->
  |           <property name="mail.from" value="nobody at nosuchhost.nosuchdomain.com"/>
  | 
  |           <!-- Enable debugging output from the javamail classes -->
  |           <property name="mail.debug" value="false"/>
  |        </configuration>
  |        <depends>jboss:service=Naming</depends>
  |     </attribute>
  |   </mbean>
  | 
  | </server>
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028804#4028804

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028804



More information about the jboss-user mailing list