immd_dequeue - Removes a message from the queue
#include <imta.h>
int immd_dequeue(immd_t md);
After successfully processing a message, the message should be deleted from the message queues with immd_dequeue().
If a permanent error has occurred while processing a message, then the message should be returned to its originator with immd_return() and then deleted from the message queued with immd_dequeue() . See the «SIMS SDK Guide» for further discussion on this topic.
Remember that once immd_dequeue() is called, the message is definitely removed from the message queue and the associated dequeue context is deleted. It is therefore crucial that a message not be dequeued with immd_dequeue() until after it has been successfully processed or found to be permanently undeliverable. Not doing so would result in lost mail.
immd_dequeue() returns IMRC_OK when successful, and one of the following error codes otherwise:
A textual version reason for the failure can be obtained by calling imta_error() immediately afterwards.
_______________________________________