After installing and starting a virgin WildFly instance (8.x or 9.0.0-SNAPSHOT) first step is to create the Mail configuration via jboss-cli.
$JBOSS_HOME/bin/jboss-cli.sh --controller=localhost:$JNP_INVOKER_PORT --connect --user=... --password=...
[standalone@localhost:9990 /]
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-smtp:add(host="smtp.1und1.de",port="25")
{"outcome" => "success"}
[standalone@localhost:9990 /]
/socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-imap:add(host="imap.1und1.de",port="143")
{"outcome" => "success"}
[standalone@localhost:9990 /]
/subsystem=mail/mail-session="java:/Mail":add(jndi-name=java:/Mail,from="abc@wildfly.org",debug=false)
{"outcome" => "success"}
[standalone@localhost:9990 /]
/subsystem=mail/mail-session="java:/Mail"/server=smtp:add(outbound-socket-binding-ref=mail-smtp,ssl=false,username="...",password="...")
{
"outcome" => "success",
"response-headers" => {
"operation-requires-reload" => true,
"process-state" => "reload-required"
}
}
[standalone@localhost:9990 /]
Why does the "reload-required" be set?
From what I found out, the reload seems not really to be needed.
I can directly deploy my app and use java:/Mail without any problems.
As far as I know it was not the case for JBoss AS 7.2.