[−][src]Struct lettre_email::EmailBuilder
Builds an Email
structure
Methods
impl EmailBuilder
[src]
impl EmailBuilder
pub fn new() -> EmailBuilder
[src]
pub fn new() -> EmailBuilder
Creates a new empty email
pub fn body<S: Into<String>>(self, body: S) -> EmailBuilder
[src]
pub fn body<S: Into<String>>(self, body: S) -> EmailBuilder
Sets the email body
pub fn set_body<S: Into<String>>(&mut self, body: S)
[src]
pub fn set_body<S: Into<String>>(&mut self, body: S)
Sets the email body
pub fn header<A: IntoHeader>(self, header: A) -> EmailBuilder
[src]
pub fn header<A: IntoHeader>(self, header: A) -> EmailBuilder
Add a generic header
pub fn add_header<A: IntoHeader>(&mut self, header: A)
[src]
pub fn add_header<A: IntoHeader>(&mut self, header: A)
Add a generic header
pub fn from<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn from<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a From
header and stores the sender address
pub fn add_from<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_from<A: IntoMailbox>(&mut self, address: A)
Adds a From
header and stores the sender address
pub fn to<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn to<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a To
header and stores the recipient address
pub fn add_to<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_to<A: IntoMailbox>(&mut self, address: A)
Adds a To
header and stores the recipient address
pub fn cc<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn cc<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a Cc
header and stores the recipient address
pub fn add_cc<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_cc<A: IntoMailbox>(&mut self, address: A)
Adds a Cc
header and stores the recipient address
pub fn bcc<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn bcc<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a Bcc
header and stores the recipient address
pub fn add_bcc<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_bcc<A: IntoMailbox>(&mut self, address: A)
Adds a Bcc
header and stores the recipient address
pub fn reply_to<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn reply_to<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a Reply-To
header
pub fn add_in_reply_to<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_in_reply_to<A: IntoMailbox>(&mut self, address: A)
Adds a In-Reply-To
header
pub fn add_reference<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_reference<A: IntoMailbox>(&mut self, address: A)
Adds a Reference
header
pub fn in_reply_to<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn in_reply_to<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a In-Reply-To
header
pub fn reference<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn reference<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a Reference
header
pub fn add_reply_to<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn add_reply_to<A: IntoMailbox>(&mut self, address: A)
Adds a Reply-To
header
pub fn sender<A: IntoMailbox>(self, address: A) -> EmailBuilder
[src]
pub fn sender<A: IntoMailbox>(self, address: A) -> EmailBuilder
Adds a Sender
header
pub fn set_sender<A: IntoMailbox>(&mut self, address: A)
[src]
pub fn set_sender<A: IntoMailbox>(&mut self, address: A)
Adds a Sender
header
pub fn subject<S: Into<String>>(self, subject: S) -> EmailBuilder
[src]
pub fn subject<S: Into<String>>(self, subject: S) -> EmailBuilder
Adds a Subject
header
pub fn set_subject<S: Into<String>>(&mut self, subject: S)
[src]
pub fn set_subject<S: Into<String>>(&mut self, subject: S)
Adds a Subject
header
pub fn date(self, date: &Tm) -> EmailBuilder
[src]
pub fn date(self, date: &Tm) -> EmailBuilder
Adds a Date
header with the given date
pub fn set_date(&mut self, date: &Tm)
[src]
pub fn set_date(&mut self, date: &Tm)
Adds a Date
header with the given date
pub fn attachment(
self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<EmailBuilder, Error>
[src]
pub fn attachment(
self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<EmailBuilder, Error>
Adds an attachment to the email
pub fn set_attachment(
&mut self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<(), Error>
[src]
pub fn set_attachment(
&mut self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<(), Error>
Adds an attachment to the email If filename is not provided, the name of the file will be used.
pub fn message_type(self, message_type: MimeMultipartType) -> EmailBuilder
[src]
pub fn message_type(self, message_type: MimeMultipartType) -> EmailBuilder
Set the message type
pub fn set_message_type(&mut self, message_type: MimeMultipartType)
[src]
pub fn set_message_type(&mut self, message_type: MimeMultipartType)
Set the message type
pub fn child(self, child: MimeMessage) -> EmailBuilder
[src]
pub fn child(self, child: MimeMessage) -> EmailBuilder
Adds a child
pub fn add_child(&mut self, child: MimeMessage)
[src]
pub fn add_child(&mut self, child: MimeMessage)
Adds a child
pub fn text<S: Into<String>>(self, body: S) -> EmailBuilder
[src]
pub fn text<S: Into<String>>(self, body: S) -> EmailBuilder
Sets the email body to plain text content
pub fn set_text<S: Into<String>>(&mut self, body: S)
[src]
pub fn set_text<S: Into<String>>(&mut self, body: S)
Sets the email body to plain text content
pub fn html<S: Into<String>>(self, body: S) -> EmailBuilder
[src]
pub fn html<S: Into<String>>(self, body: S) -> EmailBuilder
Sets the email body to HTML content
pub fn set_html<S: Into<String>>(&mut self, body: S)
[src]
pub fn set_html<S: Into<String>>(&mut self, body: S)
Sets the email body to HTML content
pub fn alternative<S: Into<String>, T: Into<String>>(
self,
body_html: S,
body_text: T
) -> EmailBuilder
[src]
pub fn alternative<S: Into<String>, T: Into<String>>(
self,
body_html: S,
body_text: T
) -> EmailBuilder
Sets the email content
pub fn set_alternative<S: Into<String>, T: Into<String>>(
&mut self,
body_html: S,
body_text: T
)
[src]
pub fn set_alternative<S: Into<String>, T: Into<String>>(
&mut self,
body_html: S,
body_text: T
)
Sets the email content
pub fn envelope(self, envelope: Envelope) -> EmailBuilder
[src]
pub fn envelope(self, envelope: Envelope) -> EmailBuilder
Sets the envelope for manual destination control If this function is not called, the envelope will be calculated from the "to" and "cc" addresses you set.
pub fn set_envelope(&mut self, envelope: Envelope)
[src]
pub fn set_envelope(&mut self, envelope: Envelope)
Sets the envelope for manual destination control If this function is not called, the envelope will be calculated from the "to" and "cc" addresses you set.
pub fn build(self) -> Result<Email, Error>
[src]
pub fn build(self) -> Result<Email, Error>
Builds the Email
Trait Implementations
impl Default for EmailBuilder
[src]
impl Default for EmailBuilder
fn default() -> EmailBuilder
[src]
fn default() -> EmailBuilder
Returns the "default value" for a type. Read more
impl PartialEq<EmailBuilder> for EmailBuilder
[src]
impl PartialEq<EmailBuilder> for EmailBuilder
fn eq(&self, other: &EmailBuilder) -> bool
[src]
fn eq(&self, other: &EmailBuilder) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EmailBuilder) -> bool
[src]
fn ne(&self, other: &EmailBuilder) -> bool
This method tests for !=
.
impl Clone for EmailBuilder
[src]
impl Clone for EmailBuilder
fn clone(&self) -> EmailBuilder
[src]
fn clone(&self) -> EmailBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for EmailBuilder
[src]
impl Eq for EmailBuilder
impl Debug for EmailBuilder
[src]
impl Debug for EmailBuilder
Auto Trait Implementations
impl Send for EmailBuilder
impl Send for EmailBuilder
impl Sync for EmailBuilder
impl Sync for EmailBuilder
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more