You can use a server management request to get information about a set of messages. The server compiles the information and sends it back to the client in a message. You can create a one-time message details request or schedule your message details request to happen automatically. In addition, you can specify that your request should be persistent, so that the message is sent even if the server is restarted.
For an overview of how to use server management requests, including how to authenticate and schedule them, see Introduction to server management requests.
Message details requests