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
sourceimpl MailRequest
impl MailRequest
sourcepub fn new_with_envelop(mail: Mail, envelop: EnvelopData) -> Self
pub fn new_with_envelop(mail: Mail, envelop: EnvelopData) -> Self
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
.
sourcepub fn override_envelop(&mut self, envelop: EnvelopData) -> Option<EnvelopData>
pub fn override_envelop(&mut self, envelop: EnvelopData) -> Option<EnvelopData>
replace the smtp EnvelopData
pub fn _into_mail_with_envelop(self) -> Result<(Mail, EnvelopData), MailError>
Trait Implementations
sourceimpl Clone for MailRequest
impl Clone for MailRequest
sourcefn clone(&self) -> MailRequest
fn clone(&self) -> MailRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MailRequest
impl Debug for MailRequest
Auto Trait Implementations
impl !RefUnwindSafe for MailRequest
impl Send for MailRequest
impl Sync for MailRequest
impl Unpin for MailRequest
impl !UnwindSafe for MailRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more