generate_rfc3464_message_preamble

March 26, 2020

Name

generate_rfc3464_message_preamble

Synopsis

#include "hooks/core/generate_rfc3464_message_preamble.h"

| int **generate_rfc3464_message_preamble** ( | closure, |   |
|   | message, |   |
|   | action, |   |
|   | body); |   |

void * <var class="pdparam">closure</var>;
ec_message * <var class="pdparam">message</var>;
dsn_actype <var class="pdparam">action</var>;
string * <var class="pdparam">body</var>;

| int **has_core_generate_rfc3464_message_preamble_hook** ( | ); |   |

| void **register_core_generate_rfc3464_message_preamble_hook_first** ( | hook, |   |
|   | closure); |   |

ec_hook_core_generate_rfc3464_message_preamble_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **register_core_generate_rfc3464_message_preamble_hook_last** ( | hook, |   |
|   | closure); |   |

ec_hook_core_generate_rfc3464_message_preamble_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| int **call_core_generate_rfc3464_message_preamble_hook** ( | message, |   |
|   | action, |   |
|   | body); |   |

ec_message * <var class="pdparam">message</var>;
dsn_actype <var class="pdparam">action</var>;
string * <var class="pdparam">body</var>;

Description

When Momentum generates a delivery status notification (DSN) message, it creates the ec_message, constructs the headers, a preamble and then attaches some portion of the reference email to the end (based on the configuration).

This hook gives you the current RFC 3464 action being invoked and the constructed headers as a string * and allows you to modify the headers directly and/or append your own preamble that will be used as the DSN body.

If a truth value is returned, the generated preamble is considered complete, otherwise the normal preamble will be generated subsequently.