[Tutor] Trying to send a URL via XMPP

Wayne Werner waynejwerner at gmail.com
Thu Dec 10 22:38:38 CET 2009


On Thu, Dec 10, 2009 at 3:29 PM, Stephen Nelson-Smith <sanelson at gmail.com>wrote:

> Hi,
>
> I'm trying to send a message to a user via XMPP - but I want them to
> receive a clickable word.
>
> I'm using Python 2.4 on RHEL 5.4 and  python-xmpp-0.4.1-6 from EPEL.
>
> I've tried variations on:
>
> >>> jid = xmpp.protocol.JID('motherinlaw at jabber.sekrit.org.uk')
> >>> cl = xmpp.Client(jid.getDomain())
> >>> cl.connect()
> >>> cl.auth(jid.getNode(),'notgoodenough')
> >>> cl.send(xmpp.protocol.Message("snelsonsmith at jabber.sekrit.org.uk",
> "<html xmlns='http://jabber.org/protocol/xhtml-im'><body xmlns='
> http://www.w3.org/1999/xhtml'><p><a href='
> http://rt.sekrit.org.uk/rt3/Ticket/Display.html?id=#77'>Ticket #77
> updated.</a></p></body></html>"))
>
> But every time I just receive the raw html....
>
> Any idea what I am doing wrong?
>
>
I don't know anything about xmpp, but you could try receiving a message and
inspecting how that is built?

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091210/11bb6971/attachment.htm>


More information about the Tutor mailing list