Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Unable to send messages to gmail/msn/yahoo
Avatar
Mallikarjun #1
Member since Dec 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Unable to send messages to gmail/msn/yahoo
Hi,

I had registered to a new jabber account. My account is xyz@jabbernet.dk.
I wanted to send message to gmail/MSN/Yahoo users. Below is my sample code

const string JID_SENDER = "xyz@jabbernet.dk";
            const string PASSWORD = "xyz";   // password of the JIS_SENDER account

            const string JID_RECEIVER = "abc@gmail.com";

            Jid jidSender = new Jid(JID_SENDER);
            XmppClientConnection xmpp = new XmppClientConnection(jidSender.Server);
            xmpp.AutoResolveConnectServer = true;
            xmpp.Open(jidSender.User, PASSWORD);
            System.Threading.Thread.Sleep(10000);
            xmpp.OnLogin += delegate(object o) { xmpp.Send(new Message(new Jid(JID_RECEIVER), MessageType.chat, "Hello, how are you?")); };

            Console.WriteLine("Wait until you get the message and press a key to continue");
            Console.ReadLine();

            xmpp.Close();

There is no exception. However, i am not able to see any chat message when i check my gmail account.
Please let me know how to add the gmail.msn/yahoo users to my contact list using API.

Thanks in advance,
Mallikarjun
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
to talk to other xmpp accounts like Gmail users your server must be on the federated network and be installed correct. Then you can send messages to all federated servers and its users. Google accepts only messages from users on your contact list. Make sure the Google users are on your contact and subscribed. Otherwise Google will drop the message silently.

For MSN and Yahoo you need gateways, also transports because they speak proprietary non federated protocols. If you use the forums search you will find lots of threads abouts this topic.

Alex
Avatar
Mallikarjun #3
Member since Dec 2008 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex,

Can we add gmail users to my jabber account contact list using API's. So while sending any messages to gmail users & if those users are not part of my contact list then send subscription to those users & then send messages.

"Make sure the Google users are on your contact and subscribed. Otherwise Google will drop the message silently"
    Can i send messages to msn/yahoo/icq users directly even if those users are not part of my contact list & if the transports are registered?

Thanks,
Mallikarjun
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Mallikarjun:
Can we add gmail users to my jabber account contact list using API's. So while sending any messages to gmail users & if those users are not part of my contact list then send subscription to those users & then send messages.
please look at the MiniClient example. All the contact handling is there.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS