5 Replies Latest reply: Jan 12, 2012 6:13 AM by Tomaz Cerar RSS

mail.smtp.auth = false - How to ?

guinotphil Apprentice

Hello,

 

How do I set in Java Mail session mail.smtp.auth = false ? (or any other protocol)...

 

I use JBoss AS 7.1.0.Final nighly built from January 6, and since this version, I always get in the Java Mail Session's properties mail.smtp.auth = true.

 

I tried the following in standalone.xml, none of them work.

 

<subsystem xmlns="urn:jboss:domain:mail:1.0">

    <mail-session jndi-name="java:jboss/mail/Default">

        <smtp-server outbound-socket-binding-ref="mail-smtp"/>

    </mail-session>

</subsystem>

 


<subsystem xmlns="urn:jboss:domain:mail:1.0">

    <mail-session jndi-name="java:jboss/mail/Default">

        <smtp-server outbound-socket-binding-ref="mail-smtp">

              <login />

         </smtp-server>

    </mail-session>

</subsystem>

=> jmail.smtp.auth=true

=>  mail.smtp.user=undefined

 


<subsystem xmlns="urn:jboss:domain:mail:1.0">

    <mail-session jndi-name="java:jboss/mail/Default">

        <smtp-server outbound-socket-binding-ref="mail-smtp">

           <login name="" password=""/>

        </smtp-server>

    </mail-session>

</subsystem>

 

=> '' is an invalid value for parameter username. Values must have a minimum length of 1 characters"

 

 

Thank you very much for your help