immd_get_message - gets the next queued message
#include <imta.h>
immd_get_message() must be called repeatedly, once for each message to process during a dequeue session. This is the first step in the dequeuing process of a message.
immd_get_message() outputs the message originator's address into the buffer referenced by from.
Each call to immd_get_message() overwrites values previously output by calls to the same function. Therefore, the content of from must be copied to a buffer allocated by the caller if it is to be re-used after immd_get_message() is again called using the same dequeue context.
immd_get_message() sets size to an approximation of the size of the message. In this release, the size can only be approximated, and is only guaranteed to be more than half of the total message size. md is the dequeue context output by an earlier call to immd_init().
Once immd_get_message() has been called, the recipients can be retrieved by calling immd_get_recipient().
imme_get_message() returns IMRC_OK when successful, and IMRC_EOF if there are no more queued messages to be read.
If another error has happened, one of the following return codes is returned:
a textual version reason for the failure can be obtained by calling imta_error() immediately afterwards.
_______________________________________
immd_init(3) , imta_error(3) , immd_get_recipient(3)