smfi_chgheader

Synopsis


int smfi_chgheader(
SMFICTX *ctx,
char *headerf,
mi_int32 hdridx,
char *headerv
);

Change or delete a message header.

Description

Called When Called only from xxfi_eom.
Effects Changes a header's value for the current message.

Arguments

Argument Description
ctx Opaque context structure.
headerf The header name, a non-NULL, null-terminated string.
hdridx Header index value (1-based). A hdridx value of 1 will modify the first occurrence of a header named headerf. If hdridx is greater than the number of times headerf appears, a new copy of headerf will be added.
headerv The new value of the given header. headerv == NULL implies that the header should be deleted.

Return Values

smfi_chgheader will return MI_FAILURE if

Otherwise, it returns MI_SUCCESS.

Notes

Example


int ret;
SMFICTX *ctx;

...

ret = smfi_chgheader(ctx, "Content-Type", 1,
"multipart/mixed;\n\tboundary=\"foobar\"");