smfi_addrcpt Function
Purpose
The smfi_addrcpt function adds a recipient for the current message.
Syntax
#include <libmilter/mfapi.h>
int smfi_addrcpt(
SMFICTX *ctx
char *rcpt
);
Description
The smfi_addrcpt function
is called only from the xxfi_eom function, to add a recipient
to the message envelope.
Note: The filter that calls the smfi_addrcpt function
must set the SMFIF_ADDRCPT flag in the smfiDesc_str structure
which is passed to the smfi_register function.
Arguments
Item | Description |
---|---|
ctx | The opaque context structure is maintained in the libmilter parameter. |
rcpt | The new recipients address. |
Return values
The smfi_addrcpt function
returns the MI_FAILURE value in the following cases. Otherwise,
the function returns MI_SUCCESS.
- The rcpt argument is NULL.
- Adding recipients in the current connection state is invalid.
- A network error occurs.
- The SMFIF_ADDRCPT flag was not set when smfi_register function was called.