NAME
immd_rewind - Rewinds a message file back to the start of
its message header
SYNOPSIS
#include <imta.h>
int immd_rewind(immd_t md);
DESCRIPTION
immd_rewind() "rewinds" a message file back to the start of
the outermost message header. This routine may be called any
time after all of the envelope To: addresses have been read
with immd_get_recipient() and prior to dequeuing or defer-
ring the message. After immd_rewind() has been called, the
message header and body may be read (again) with
immd_read_header(), or immd_read_text().
RETURN VALUES
immd_rewind() returns IMRC_OK when successful, and one of
the following error codes otherwise.
IMRC_BAD_CONTEXT
The dequeue context md has not been initialized
or has been corrupted. Make sure immd_init()
has been previously called.
IMRC_MESSAGE_CORRUPTED
it is likely that the file could not be read,
because it was deleted or because it's missing
both message header and message body. This can
happen consecutively to a hardware failure. The
calling program should then abort processing of
the current message and call either
immd_dequeue() or immd_defer().
A textual explanation of the failure can be obtained by cal-
ling imta_error() immediately afterwards.
ATTRIBUTES
_______________________________________
| Attribute Type | Attribute Value|
|____________________|_________________|
| Architecture | sparc, x86 |
|____________________|_________________|
| Availability | SUNWimsdk |
|____________________|_________________|
| MT-Level | MT-Safe |
|____________________|_________________|
| Interface Stability| Stable |
|____________________|_________________|
SEE ALSO
immd_init(3), immd_read_text(3), imta_error(3),
immd_read_header(3), immd_get_recipient(3)