<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: xmppy code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 08 Aug 2008 05:08:07 GMT</pubDate>
    <description>DZone Snippets: xmppy code</description>
    <item>
      <title>How to send IM jabber message to google chat using python and xmppy</title>
      <link>http://snippets.dzone.com/posts/show/3986</link>
      <description>// From http://www.franklinmint.fm/blog/archives/000603.html&lt;br /&gt;// This works with version xmpppy-0.4.0.win32.exe from http://xmpppy.sourceforge.net/&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import sys,xmpp&lt;br /&gt;&lt;br /&gt;# Google Talk constants&lt;br /&gt;FROM_GMAIL_ID = "user@gmail.com"&lt;br /&gt;GMAIL_PASS = "password"&lt;br /&gt;GTALK_SERVER = "talk.google.com"&lt;br /&gt;TO_GMAIL_ID = "user@gmail.com"&lt;br /&gt;&lt;br /&gt;jid=xmpp.protocol.JID(FROM_GMAIL_ID)&lt;br /&gt;cl=xmpp.Client(jid.getDomain(),debug=[])&lt;br /&gt;if not cl.connect((GTALK_SERVER,5222)):&lt;br /&gt;    raise IOError('Can not connect to server.')&lt;br /&gt;if not cl.auth(jid.getNode(),GMAIL_PASS):&lt;br /&gt;    raise IOError('Can not auth with server.')&lt;br /&gt;&lt;br /&gt;cl.send( xmpp.Message( "someone@gmail.com" ,"Hi" ) )&lt;br /&gt;cl.disconnect()&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 10 May 2007 21:55:22 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3986</guid>
      <author>mellerbeck (Michael Ellerbeck)</author>
    </item>
  </channel>
</rss>
