String smtpPortExpr = buildExpression(ServerProperties.PROP_EMAIL_SMTP_PORT, serverProperties, true);
// Tweek the mail configuration that comes out of box. Setup a batch request to write the proper attributes.
// First, the from address (TODO: there is also a "ssl", "username" and "password" attribute we could set for authz)
Address addr = Address.root().add(JBossASClient.SUBSYSTEM, "mail", "mail-session", "java:jboss/mail/Default");
ModelNode writeFromAddr = JBossASClient.createRequest(JBossASClient.WRITE_ATTRIBUTE, addr);
writeFromAddr.get(JBossASClient.NAME).set("from");
writeFromAddr.get(JBossASClient.VALUE).setExpression(fromAddressExpr);
// now the SMTP host