帮助我
I using labrary jabber-net to send message in google chat. Sometines I have autorization and send message(when run application), but almost allways I can t autorization and don t send message...
守则 C#:
private static string message; public static string _message { get { return message; } set { message = value; } }
private static string emailToSend;
public static string _emailToSend
{
get { return emailToSend; }
set { emailToSend = value; }
}
static JabberClient jc = new JabberClient();
static void SendMessageToGoogleTalk(string message, string emailToSend)
{
jc.User = "***@gmail.com";
jc.Server = "gmail.com";
jc.Password = "****";
_message = message;
_emailToSend = emailToSend;
jc.Connect();
jc.OnError += client_OnError;
jc.OnAuthenticate += client_OnAuthenticate;
jc.Close();
}
static void client_OnAuthenticate(object sender)
{
jc.Message(emailToSend, message);
}
static void client_OnError(object sender, Exception exception)
{
isRecieveMessage = false;
}
每个人都知道,我如何解决这一问题?