[−][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 header<A: Into<Header>>(self, header: A) -> EmailBuilder
[src]
pub fn header<A: Into<Header>>(self, header: A) -> EmailBuilder
Add a generic header
pub fn from<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn from<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
Adds a From
header and stores the sender address
pub fn to<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn to<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
Adds a To
header and stores the recipient address
pub fn cc<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn cc<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
Adds a Cc
header and stores the recipient address
pub fn bcc<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn bcc<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
Adds a Bcc
header and stores the recipient address
pub fn reply_to<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn reply_to<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
Adds a Reply-To
header
pub fn in_reply_to(self, message_id: MessageId) -> EmailBuilder
[src]
pub fn in_reply_to(self, message_id: MessageId) -> EmailBuilder
Adds a In-Reply-To
header
pub fn references(self, message_id: MessageId) -> EmailBuilder
[src]
pub fn references(self, message_id: MessageId) -> EmailBuilder
Adds a References
header
pub fn sender<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
[src]
pub fn sender<A: Into<Mailbox>>(self, address: A) -> EmailBuilder
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 date(self, date: &Tm) -> EmailBuilder
[src]
pub fn date(self, date: &Tm) -> EmailBuilder
Adds a Date
header with the given date
pub fn attachment_from_file(
self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<EmailBuilder, Error>
[src]
pub fn attachment_from_file(
self,
path: &Path,
filename: Option<&str>,
content_type: &Mime
) -> Result<EmailBuilder, Error>
Adds an attachment to the email from a file
If not specified, the filename will be extracted from the file path.
pub fn attachment(
self,
body: &[u8],
filename: &str,
content_type: &Mime
) -> Result<EmailBuilder, Error>
[src]
pub fn attachment(
self,
body: &[u8],
filename: &str,
content_type: &Mime
) -> Result<EmailBuilder, Error>
Adds an attachment to the email from a vector of bytes.
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 child(self, child: MimeMessage) -> EmailBuilder
[src]
pub fn child(self, child: MimeMessage) -> EmailBuilder
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 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 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 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 build(self) -> Result<Email, Error>
[src]
pub fn build(self) -> Result<Email, Error>
Builds the Email
Trait Implementations
impl Clone for EmailBuilder
[src]
impl Clone for EmailBuilder
fn clone(&self) -> EmailBuilder
[src]
fn clone(&self) -> EmailBuilder
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 Default for EmailBuilder
[src]
impl Default for EmailBuilder
fn default() -> EmailBuilder
[src]
fn default() -> EmailBuilder
impl PartialEq<EmailBuilder> for EmailBuilder
[src]
impl PartialEq<EmailBuilder> for EmailBuilder
fn eq(&self, other: &EmailBuilder) -> bool
[src]
fn eq(&self, other: &EmailBuilder) -> bool
fn ne(&self, other: &EmailBuilder) -> bool
[src]
fn ne(&self, other: &EmailBuilder) -> bool
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> From for T
[src]
impl<T> From for T
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,
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>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
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
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>
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