1 Reply Latest reply on Dec 18, 2012 10:10 AM by blabno

    Creating mail session with jboss-cli

    oswa1d

      Hello everyone!

      I'm trying to migrate my application servers from Glassfish to JBoss and configure all the configuration options via jboss-cli command line tool. It looks nice and intuitive, but I'm stuck in creating mail-session. So far I've managed to create session and server nodes, but failed to add authentication data (login and pass):

       

        # /subsystem=mail/mail-session="java:/mail/myMail":add(jndi-name="java:/mail/myMail", from="noreply@acme.com")

        # /subsystem=mail/mail-session="java:/mail/myMail"/server=smtp:add

        # /subsystem=mail/mail-session="java:/mail/myMail"/server=smtp:write-attribute(name=outbound-socket-binding-ref, value=acme-smtp)

       

      Next I need to add smtp login and pass, but I have no idea how to do it, please help.

       

      wbr, Andrey

        • 1. Re: Creating mail session with jboss-cli
          blabno

          /profile=default/subsystem=mail/mail-session=java\:myappname\/mail\/Default/server=smtp:add(outbound-socket-binding-ref=mail-smtp,password=somepass,ssl=true,username=user@example.com)

           

          if you have strange problems that tell you nothing more the Operation rolled back then do this:

          /host=master:reload(admin-only=true,restart-servers=false)

           

          Of course I assume domain mode.