Struct mail_smtp::MailRequest

source ·
pub struct MailRequest { /* private fields */ }
Expand description

This type contains a mail and potentially some envelop data.

It is needed as in some edge cases the smtp envelop data (i.e. smtp from and smtp recipient) can not be correctly derived from the mail.

The default usage is to directly turn a Mail into a MailRequest by either using MailRequest::new, MailRequest::from or Mail::into.

Implementations

creates a new MailRequest from a Mail instance

create a new MailRequest and use custom smtp EnvelopData

Note that envelop data comes from new-tokio-smtp::send_mail and is not re-exported so if you happen to run into one of the view cases where you need to set it manually just import it from new-tokio-smtp.

replace the smtp EnvelopData

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.