Posted By

mahome on 04/02/09


Tagged

mail JBoss


Versions (?)

JBoss Mail-Config with Authentication


 / Published in: Java
 

This is the default Mail-Config file mail-service.xml by JBoss with the additional line for authentication.

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- $Id: mail-service.xml 62349 2007-04-15 16:48:15Z dimitris@jboss.org $ -->
  3. <server>
  4.  
  5. <!-- ==================================================================== -->
  6. <!-- Mail Connection Factory -->
  7. <!-- ==================================================================== -->
  8.  
  9. <mbean code="org.jboss.mail.MailService"
  10. name="jboss:service=Mail">
  11. <attribute name="JNDIName">java:/Mail</attribute>
  12. <attribute name="User">username</attribute>
  13. <attribute name="Password">password</attribute>
  14. <attribute name="Configuration">
  15. <!-- A test configuration -->
  16. <configuration>
  17. <!-- Change to your mail server prototocol -->
  18. <property name="mail.store.protocol" value="pop3"/>
  19. <property name="mail.transport.protocol" value="smtp"/>
  20.  
  21. <!-- Change to the user who will receive mail -->
  22. <property name="mail.user" value="nobody"/>
  23.  
  24. <!-- Change to the mail server -->
  25. <property name="mail.pop3.host" value="pop3.nosuchhost.nosuchdomain.com"/>
  26.  
  27. <!-- Change to the SMTP gateway server -->
  28. <property name="mail.smtp.host" value="smtp.nosuchhost.nosuchdomain.com"/>
  29. <property name="mail.smtp.auth" value="true"/><!-- for authentication -->
  30.  
  31. <!-- The mail server port -->
  32. <property name="mail.smtp.port" value="25"/>
  33.  
  34. <!-- Change to the address mail will be from -->
  35. <property name="mail.from" value="[email protected]"/>
  36.  
  37. <!-- Enable debugging output from the javamail classes -->
  38. <property name="mail.debug" value="false"/>
  39. </configuration>
  40. </attribute>
  41. <depends>jboss:service=Naming</depends>
  42. </mbean>
  43.  
  44. </server>

Report this snippet  

You need to login to post a comment.