Can't send or verify email under JBOSS

We found that JBoss was loading its own email utility. By removing the following code from the jboss standalone.xml file, we were able to use the Lucee mail integration.

 <extension module="org.jboss.as.mail"/>

        <subsystem xmlns="urn:jboss:domain:mail:3.0"> 
            <mail-session name="default" jndi-name="java:jboss/mail/Default">
                <smtp-server outbound-socket-binding-ref="mail-smtp"/>
            </mail-session>
        </subsystem>

        <outbound-socket-binding name="mail-smtp"> 
            <remote-destination host="localhost" port="25"/>
        </outbound-socket-binding>

2 Likes

Thats not an ideal nor normal way to handle mail in Jboss

there is a file called mail.properties in your conf directory

That is where you would edit your settings as on the next update you may need to edit core files again.
mail.user = someuser // the user to to connect to the email server
mail.pop3.host = yourmailhostFQDNorIP // the pop host
mail.smtp.host = yourSMTP.HOST // the smtp host
mail.from = nobody@localhost // the ‘from’ field that is filled in by default email from

The code I posted from jboss was there by default. We didn’t create it.