message.setFrom does not work

Hi all,

I created a smack message as following:

Chat newChat = connection.createChat(recipient);

Message msg = newChat.createMessage();



But when i intercept the message on the jabber server side, the “from” field is always the user that owns the connection who is different from “aValidUser”.

Can anyone explain this to me?

What I would like to do is, open a connection from our application to jabber, and all application users can send message to each other via this connection but the “from” filed has to be the actual sender, not the user that our application uses to open connection to jabber server.

Many thanks,


Hi Trung,

I expect (without checking the source) that spoofing the from address is not allowed within Smack. Even if it is possible Wildfire should drop such messages.

It could help to write a Wildfire Plugin instead of using Smack.


Thanks, LG.