[−][src]Attribute Macro milter_callback::on_mail
#[on_mail]
Generates a callback function of type MailCallback
that delegates to the
annotated function.
As its sole argument on_mail
takes an identifier to be used as the name of
the generated function.
The on_mail
callback handles processing of an envelope sender (MAIL FROM
SMTP command). The signature of the annotated function must be as specified
below.
Arguments:
Context<T>
– the callback contextVec<&str>
– the SMTP command arguments, the first element being the sender address
Return type:
Status
– the response status
Examples
use milter::{Context, Status}; #[on_mail(mail_callback)] fn handle_mail(context: Context<MyData>, smtp_args: Vec<&str>) -> Status { Status::Continue }