[][src]Attribute Macro milter_callback::on_eom

#[on_eom]

Generates a callback function of type EomCallback that delegates to the annotated function.

As its sole argument on_eom takes an identifier to be used as the name of the generated function.

The on_eom callback is called when the end of the message body is reached, that is the end of the SMTP DATA command. This is the only stage where message-modifying actions can be taken. The signature of the annotated function must be as specified below.

Arguments:

Return type:

  • Status – the response status

Examples

use milter::{ActionContext, Status};

#[on_eom(eom_callback)]
fn handle_eom(context: ActionContext<MyData>) -> Status {
    Status::Continue
}