pub struct Email { /* private fields */ }Expand description
Outgoing email before a transport sends it.
Implementations§
Source§impl Email
impl Email
Sourcepub fn from(
self,
address: impl TryInto<Address, Error = MailerError>,
) -> Result<Email, MailerError>
pub fn from( self, address: impl TryInto<Address, Error = MailerError>, ) -> Result<Email, MailerError>
Sourcepub fn to(
self,
address: impl TryInto<Address, Error = MailerError>,
) -> Result<Email, MailerError>
pub fn to( self, address: impl TryInto<Address, Error = MailerError>, ) -> Result<Email, MailerError>
Sourcepub fn cc(
self,
address: impl TryInto<Address, Error = MailerError>,
) -> Result<Email, MailerError>
pub fn cc( self, address: impl TryInto<Address, Error = MailerError>, ) -> Result<Email, MailerError>
Sourcepub fn bcc(
self,
address: impl TryInto<Address, Error = MailerError>,
) -> Result<Email, MailerError>
pub fn bcc( self, address: impl TryInto<Address, Error = MailerError>, ) -> Result<Email, MailerError>
Sourcepub fn reply_to(
self,
address: impl TryInto<Address, Error = MailerError>,
) -> Result<Email, MailerError>
pub fn reply_to( self, address: impl TryInto<Address, Error = MailerError>, ) -> Result<Email, MailerError>
Sourcepub fn text(self, text: impl Into<String>) -> Email
pub fn text(self, text: impl Into<String>) -> Email
Sets a text-only body (clears HTML unless Self::html is used after via Self::body).
Sourcepub fn html(self, html: impl Into<String>) -> Email
pub fn html(self, html: impl Into<String>) -> Email
Sets an HTML-only body (keeps text when already set).
Sourcepub fn attach(self, attachment: Attachment) -> Email
pub fn attach(self, attachment: Attachment) -> Email
Adds a downloadable attachment.
Sourcepub fn embed(self, attachment: Attachment) -> Email
pub fn embed(self, attachment: Attachment) -> Email
Adds an inline (CID) part for HTML cid: references.
Sourcepub fn mime_tree(&self) -> MimeTree
pub fn mime_tree(&self) -> MimeTree
Mime multipart tree for this message (see crate::MimeTree).
Sourcepub fn from_addresses(&self) -> &[Address]
pub fn from_addresses(&self) -> &[Address]
From addresses.
Sourcepub fn to_addresses(&self) -> &[Address]
pub fn to_addresses(&self) -> &[Address]
To addresses.
Sourcepub fn cc_addresses(&self) -> &[Address]
pub fn cc_addresses(&self) -> &[Address]
Cc addresses.
Sourcepub fn bcc_addresses(&self) -> &[Address]
pub fn bcc_addresses(&self) -> &[Address]
Bcc addresses.
Sourcepub fn reply_to_addresses(&self) -> &[Address]
pub fn reply_to_addresses(&self) -> &[Address]
Reply-To addresses.
Sourcepub fn subject_line(&self) -> &str
pub fn subject_line(&self) -> &str
Subject line.
Sourcepub const fn message_body(&self) -> &Body
pub const fn message_body(&self) -> &Body
Body parts.
Sourcepub fn attachments(&self) -> &[Attachment]
pub fn attachments(&self) -> &[Attachment]
Attachments.
Trait Implementations§
impl Eq for Email
impl StructuralPartialEq for Email
Auto Trait Implementations§
impl Forget for Email
impl Freeze for Email
impl Move for Email
impl RefUnwindSafe for Email
impl Send for Email
impl Sync for Email
impl Unpin for Email
impl UnsafeUnpin for Email
impl UnwindSafe for Email
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.