Skip to main content

envelop

Namespace: global/envelop

Functions to inspect and mutate the SMTP envelop.

fn rw_mail_from

fn rw_mail_from(ctx: State<StatefulCtxReceived>, new_addr: String) -> Result<()>
Rewrite the sender received from the `MAIL FROM` command.

fn rw_rcpt

fn rw_rcpt(ctx: State<StatefulCtxReceived>, old_addr: String, new_addr: String) -> Result<()>
Replace a recipient received by a `RCPT TO` command.

fn add_rcpt

fn add_rcpt(ctx: State<StatefulCtxReceived>, new_addr: String) -> Result<()>
Add a new recipient to the envelop. Note that this does not add the recipient to the `To` header. Use `msg::add_rcpt` for that.

fn bcc

fn bcc(ctx: State<StatefulCtxReceived>, new_addr: String) -> Result<()>
Alias for `envelop::add_rcpt`.

fn rm_rcpt

fn rm_rcpt(ctx: State<StatefulCtxReceived>, addr: String) -> Result<()>
Remove a recipient from the envelop. Note that this does not remove the recipient from the `To` header. Use `msg::rm_rcpt` for that.