perldoc > Net::XMPP::Message

📖 NAME

Net::XMPP::Message - XMPP Message Module

🚀 Quick Reference

Use CaseCommandDescription
Create a new message objectNet::XMPP::Message->new()Create a new message to send to the server
Set message fields$Mess->SetMessage(to=>..., subject=>..., body=>...)Set multiple fields in the <message/> tag
Get the ‘to’ attribute$Mess->GetTo()Returns the value in the to attribute
Get the ‘from’ attribute$Mess->GetFrom()Returns the value in the from attribute
Get the message type$Mess->GetType()Returns the type attribute (normal, chat, etc.)
Get the message body$Mess->GetBody()Returns the data in the <body/> tag
Get the subject$Mess->GetSubject()Returns the data in the <subject/> tag
Get the thread$Mess->GetThread()Returns the data in the <thread/> tag
Get error details$Mess->GetError(), $Mess->GetErrorCode()Returns error string and error code
Get timestamp$Mess->GetTimeStamp()Returns the time the message was created/received
Reply to a message$Mess->Reply()Creates a new Message object with to/from swapped and subject prefixed with “re: ”
Remove attributes$Mess->RemoveTo(), etc.Remove specific attributes from the message
Test if attribute defined$Mess->DefinedTo(), etc.Returns 1 if attribute is defined, 0 otherwise

📋 SYNOPSIS

Net::XMPP::Message is a companion to the Net::XMPP module. It provides the user a simple interface to set and retrieve all parts of an XMPP Message.

📝 DESCRIPTION

A Net::XMPP::Message object is passed to the callback function for the message. Also, the first argument to the callback functions is the session ID from XML::Stream. There are some cases where you might want this information, like if you created a Client that connects to two servers at once, or for writing a mini server.

use Net::XMPP;

sub message {
  my ($sid,$Mess) = @_;
  .
  .
  .
}

You now have access to all of the retrieval functions available.

To create a new message to send to the server:

use Net::XMPP;

$Mess = Net::XMPP::Message->new();

Now you can call the creation functions below to populate the tag before sending it.

âš™ī¸ METHODS

🔍 Retrieval functions

đŸ› ī¸ Creation functions

đŸ—‘ī¸ Removal functions

✅ Test functions

âœī¸ AUTHOR

Originally authored by Ryan Eatmon.

Previously maintained by Eric Hacker.

Currently maintained by Darian Anthony Patrick.

ÂŠī¸ COPYRIGHT

This module is free software, you can redistribute it and/or modify it under the LGPL 2.1.

Net::XMPP::Message
📖 NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION âš™ī¸ METHODS
🔍 Retrieval functions đŸ› ī¸ Creation functions đŸ—‘ī¸ Removal functions ✅ Test functions
âœī¸ AUTHOR ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-29 14:29 @216.73.217.111
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^