You should be able to configure this with the web console (Configuration -> Subsystems -> Mail) or with CLI. Here's a reference to the management model Wildfly Model Reference.
The CLI commands would look something like this.
batch /subsystem=mail/mail-session=msexchange:add(from="firstname.lastname@example.org", jndi-name="java:/mail/service_msexchange") /subsystem=mail/mail-session=msexchange/server=smtp:add(outbound-socket-binding-ref=mail-smtp, username="ACCOUNTS\myservice") run-batch
James R. Perkins
Just wanted to update this email thread in the event someone out there finds themselves in a similar position, this is how I got my JBoss WildFly 10 to communicate with our ms exchange server:
Inside the standalone.xml, I configured the following:
Within <subsystem xmlns="urn:jboss:domain:mail:2.0">
<mail-session name="mail-msexchange" from="email@example.com" jndi-name="java:/mail/service_msexchange" debug="true"> <smtp-server outbound-socket-binding-ref="mail-msexchange"/> </mail-session>
<outbound-socket-binding name="mail-msexchange"> <remote-destination host="<exchange-ip-here>" port="25"/> </outbound-socket-binding>
That's all that was needed in my case.
Hope that helps someone