Sends a chat message with the specified content to the specified JID.

Namespace: S22.Xmpp.Im
Assembly: S22.Xmpp (in S22.Xmpp.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void SendMessage(
	Jid to,
	IDictionary<string, string> bodies,
	IDictionary<string, string> subjects = null,
	string thread = null,
	MessageType type = MessageType.Normal,
	CultureInfo language = null
)

Parameters

to
Type: S22.Xmpp..::..Jid
The JID of the intended recipient.
bodies
Type: System.Collections.Generic..::..IDictionary<(Of <(<'String, String>)>)>
A dictionary of message bodies. The dictionary keys denote the languages of the message bodies and must be valid ISO 2 letter language codes.
subjects (Optional)
Type: System.Collections.Generic..::..IDictionary<(Of <(<'String, String>)>)>
A dictionary of message subjects. The dictionary keys denote the languages of the message subjects and must be valid ISO 2 letter language codes.
thread (Optional)
Type: System..::..String
The conversation thread the message belongs to.
type (Optional)
Type: S22.Xmpp.Im..::..MessageType
The type of the message. Can be one of the values from the MessagType enumeration.
language (Optional)
Type: System.Globalization..::..CultureInfo
The language of the XML character data of the stanza.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionThe to parameter or the bodies parameter is null.
System.IO..::..IOExceptionThere was a failure while writing to or reading from the network.
System..::..InvalidOperationExceptionThe XmppIm instance is not connected to a remote host, or the XmppIm instance has not authenticated with the XMPP server.
System..::..ObjectDisposedExceptionThe XmppIm object has been disposed.

See Also