Subject: Cannot connect to Gmail Server
Hi,
I am very new to agsXMPP. I am trying to connect Gmail server with following configuration to send a message on login to my self but I am unable to
.
Any help / pointers would be very helpful. The two users are real and are in each others friends list.
As this is just a sample, I have used console application.
using System;
using System.Collections.Generic;
using System.Text;
using agsXMPP.protocol.client;
using agsXMPP.protocol;
using agsXMPP;
namespace AgsxmppSample
{
class Program
{
static void Main(string[] args)
{
XmppClientConnection xmpp = new XmppClientConnection();
xmpp.Server = "gmail.com";
xmpp.ConnectServer = "talk.google.com";
xmpp.Port = 5222;
xmpp.Username = "epichatty@googlemail.com";
xmpp.Password = "*********";
xmpp.AutoResolveConnectServer = false;
xmpp.Open();
xmpp.OnLogin += delegate(object o)
{
xmpp.Send(new Message
("naveed.ahmad@gmail.com", MessageType.chat, "Hello, how are you?, auto message from epichatty"));
};
for (int i = 0; i < 10; i++)
{
Console.WriteLine(xmpp.XmppConnectionState);
Console.WriteLine(xmpp.Authenticated);
//For XmppConnectionState I get connecting and for Authenticated i get False
System.Threading.Thread.Sleep(100000);
}
Console.ReadLine();
xmpp.Close();
}
}
}
I am very new to agsXMPP. I am trying to connect Gmail server with following configuration to send a message on login to my self but I am unable to

Any help / pointers would be very helpful. The two users are real and are in each others friends list.
As this is just a sample, I have used console application.
using System;
using System.Collections.Generic;
using System.Text;
using agsXMPP.protocol.client;
using agsXMPP.protocol;
using agsXMPP;
namespace AgsxmppSample
{
class Program
{
static void Main(string[] args)
{
XmppClientConnection xmpp = new XmppClientConnection();
xmpp.Server = "gmail.com";
xmpp.ConnectServer = "talk.google.com";
xmpp.Port = 5222;
xmpp.Username = "epichatty@googlemail.com";
xmpp.Password = "*********";
xmpp.AutoResolveConnectServer = false;
xmpp.Open();
xmpp.OnLogin += delegate(object o)
{
xmpp.Send(new Message
("naveed.ahmad@gmail.com", MessageType.chat, "Hello, how are you?, auto message from epichatty"));
};
for (int i = 0; i < 10; i++)
{
Console.WriteLine(xmpp.XmppConnectionState);
Console.WriteLine(xmpp.Authenticated);
//For XmppConnectionState I get connecting and for Authenticated i get False
System.Threading.Thread.Sleep(100000);
}
Console.ReadLine();
xmpp.Close();
}
}
}