Skip to main content


Namespace: global/context

Inspect the transaction context.

fn to_debug

fn to_debug(ctx: State<StatefulCtxReceived>) -> String

fn set_routing_path

fn set_routing_path(ctx: State<StatefulCtxReceived>, rcpt: Recipient>, path: String) -> Result<()>

fn client_address

fn client_address(ctx: State<StatefulCtxReceived>) -> String
Get the address of the client.

get client_ip

fn get client_ip(ctx: State<StatefulCtxReceived>) -> String
Get the ip address of the client.

fn client_port

fn client_port(ctx: State<StatefulCtxReceived>) -> int
Get the ip port of the client.

fn server_address

fn server_address(ctx: State<StatefulCtxReceived>) -> String
Get the full server address.

fn server_ip

fn server_ip(ctx: State<StatefulCtxReceived>) -> String
Get the server's ip.

fn server_port

fn server_port(ctx: State<StatefulCtxReceived>) -> int
Get the server's port.

fn connection_timestamp

fn connection_timestamp(ctx: State<StatefulCtxReceived>) -> OffsetDateTime
Get a the timestamp of the client's connection time.

fn server_name

fn server_name(ctx: State<StatefulCtxReceived>) -> String
Get the name of the server.

fn is_secured

fn is_secured(_ctx: State<StatefulCtxReceived>) -> bool
Has the connection been secured under the encryption protocol SSL/TLS.

get helo

fn get helo(ctx: State<StatefulCtxReceived>) -> Result<String>
Get the value of the `HELO/EHLO` command sent by the client.

get sender

fn get sender(ctx: State<StatefulCtxReceived>) -> ?>
Get the value of the `MAIL FROM` command sent by the client.

get recipients

fn get recipients(ctx: State<StatefulCtxReceived>) -> Array>
Get the list of recipients received by the client.

get domain

fn get domain(ctx: Recipient>) -> String
fn get domain(ctx: Mailbox) -> String
Get the recipient's domain.

get local_part

fn get local_part(ctx: Recipient>) -> String

get address

fn get address(ctx: Recipient>) -> String

get is_null

fn get is_null(mailbox: ?) -> bool

fn mail_timestamp

fn mail_timestamp(ctx: State<StatefulCtxReceived>) -> OffsetDateTime>
Get the time of reception of the email.

get message_id

fn get message_id(ctx: State<StatefulCtxReceived>) -> Result<String>
Get the unique id of the received message.