below is the function snippet i wrote, if i called it in JSP, it works only 50% & no exception(just doesn’'t send the message), could u tell me what mistake i maybe made?
public int sendMsg(String host, String user, String pwd, String recipient, String subject, String content) {
try {
XMPPConnection conn = new XMPPConnection(host);
conn.login(user, pwd);
S
conn.createChat(recipient).sendMessage("[" + subject + "] " + content);
conn.close();
}
catch (Exception e) {
System.out.println(“exception!!!” + e.getMessage());
}
return 0;
}