Package pyxmpp2 :: Module simple
[hide private]

Module simple

Simple API for simple things like sendig messages.

The simplest way to send a message:

>>> from pyxmpp2.simple import send_message
>>> send_message("bob@example.org", "bob's password", "alice@example.org",
...                                                          "Hello Alice")
Please note, though:
Classes [hide private]
  FireAndForget
A minimal XMPP client that just connects to a server and runs single function.
Functions [hide private]
 
send_message(source_jid, password, target_jid, body, subject=None, message_type='chat', message_thread=None, settings=None)
Star an XMPP session and send a message, then exit.
Function Details [hide private]

send_message(source_jid, password, target_jid, body, subject=None, message_type='chat', message_thread=None, settings=None)

 
Star an XMPP session and send a message, then exit.
Parameters:
  • source_jid (pyxmpp2.jid.JID or basestring) - sender JID
  • password (basestring) - sender password
  • target_jid (pyxmpp.jid.JID or basestring) - recipient JID
  • body (basestring) - message body
  • subject (basestring) - message subject
  • message_type (basestring) - message type
  • message_thread - message thread id
  • settings (pyxmpp2.settings.XMPPSettings) - other settings