Once again the solution was pretty evident, jboss/server/default/deploy/mail-service.xml
Things still are not working correctly. I think the code might be broken. I've tracked the problem to org.jboss.nukes.core.modules.mail.MailModule to the method:
public boolean deliver(int serialId, String from, String to, String subject, String body)
It seems that the call MXRecord records = performMXLookup(to.substring(index + 1)); is not returning any smtp servers even though I have it specified in the mail-service.xml (turning on the debugging doesn't provide any info). If I hard code my smtp server in there, they everything works correctly.
this works with 2 different mechanism :
mode == 0 : means the mail module will perform DNS lookup to send the mails, so in that case you need to setup the DNSServer property to a suitable DNSServer.
mode == 1 : it uses an email account, in that case you need to setup the Gateway, SMTPUser and SMTPPassword to get it working,