Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
gigadreamer #1
Member since Jul 2013 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: how to
I'm trying to send a msg from a jabber account to a gmail account. I do the following:

*create a new c# Project
*add the Matrix.dll as reference
*add a button to the Project form and put the Basic code on it:

  1. // basic send message example
  2. var xmppClient = new XmppClient {XmppDomain = "jabber.org", Username = "user1", Password = "secret"};
  3. xmppClient.OnRosterEnd += delegate {xmppClient.Send(new Matrix.Xmpp.Client.Message {To = "user2@gmail.com", Type = MessageType.chat, Body = "Hello World"});};
  4. xmppClient.Open();


why it does not work?
This post was edited 2 times, last on 2013-07-08, 22:09 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by gigadreamer:
why it does not work?

no idea, Gmail accepts messages only from people on your contact list with proper subscription. Id the sender is on the contact list and subscribed it must work.
Its also possible that the jabber.org server has problems at the moment to contact to the Gmail server.
I also suggest to start with the MiniClient example which is included with the MatriX download.

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: