writePort.get(JBossASClient.NAME).set("port");
JBossASClient.setPossibleExpression(writePort, JBossASClient.VALUE, smtpPortExpr);
ModelNode batch = JBossASClient.createBatchRequest(writeFromAddr, writeHost, writePort);
JBossASClient client = new JBossASClient(mcc);
ModelNode response = client.execute(batch);
if (!JBossASClient.isSuccess(response)) {
throw new FailureException(response, "Failed to setup mail service");
}
LOG.info("Mail service has been configured.");
}