imme_copy - Makes a verbatim copy of a message header and content
#include <imta.h>
int imme_copy(imme_t me, immd_t md);
Use imme_copy() to efficiently copy to a new message being enqueued a verbatim copy of a message being dequeued. Only the portion of the dequeued message following the read point for that message will be copied. Thus, if the entire dequeued message - header and content - is to be copied, then it may be necessary to first call immd_rewind. imme_copy() is especially useful in cases where a message needs to have its envelope changed but be left enqueued. For example, when a message was successfully delivered to some but not all recipients. In that case, if some of the recipients could not be delivered to owing to temporary problems, the message should be re-enqueued verbatim to just those recipients who could not be handled because of temporary problems. In such a case, be sure to also call imme_AliasNoExpansion while enqueuing the new message. me is the enqueue context previously created with imme_init. md is a dequeue context created with immd_init.
imme_copy() returns IMRC_OK when successful.
Otherwise, one of the following error codes is returned:
_______________________________________