Struct lettre::email::EmailBuilder
[−]
[src]
pub struct EmailBuilder { /* fields omitted */ }
Builds an Email
structure
Methods
impl EmailBuilder
[src]
fn new() -> EmailBuilder
Creates a new empty email
fn body(self, body: &str) -> EmailBuilder
Sets the email body
fn set_body(&mut self, body: &str)
Sets the email body
fn header<A: ToHeader>(self, header: A) -> EmailBuilder
Add a generic header
fn add_header<A: ToHeader>(&mut self, header: A)
Add a generic header
fn from<A: ToMailbox>(self, address: A) -> EmailBuilder
Adds a From
header and stores the sender address
fn add_from<A: ToMailbox>(&mut self, address: A)
Adds a From
header and stores the sender address
fn to<A: ToMailbox>(self, address: A) -> EmailBuilder
Adds a To
header and stores the recipient address
fn add_to<A: ToMailbox>(&mut self, address: A)
Adds a To
header and stores the recipient address
fn cc<A: ToMailbox>(self, address: A) -> EmailBuilder
Adds a Cc
header and stores the recipient address
fn add_cc<A: ToMailbox>(&mut self, address: A)
Adds a Cc
header and stores the recipient address
fn reply_to<A: ToMailbox>(self, address: A) -> EmailBuilder
Adds a Reply-To
header
fn add_reply_to<A: ToMailbox>(&mut self, address: A)
Adds a Reply-To
header
fn sender<A: ToMailbox>(self, address: A) -> EmailBuilder
Adds a Sender
header
fn set_sender<A: ToMailbox>(&mut self, address: A)
Adds a Sender
header
fn subject(self, subject: &str) -> EmailBuilder
Adds a Subject
header
fn set_subject(&mut self, subject: &str)
Adds a Subject
header
fn date(self, date: &Tm) -> EmailBuilder
Adds a Date
header with the given date
fn set_date(&mut self, date: &Tm)
Adds a Date
header with the given date
fn message_type(self, message_type: MimeMultipartType) -> EmailBuilder
Set the message type
fn set_message_type(&mut self, message_type: MimeMultipartType)
Set the message type
fn child(self, child: MimeMessage) -> EmailBuilder
Adds a child
fn add_child(&mut self, child: MimeMessage)
Adds a child
fn text(self, body: &str) -> EmailBuilder
Sets the email body to plain text content
fn set_text(&mut self, body: &str)
Sets the email body to plain text content
fn html(self, body: &str) -> EmailBuilder
Sets the email body to HTML content
fn set_html(&mut self, body: &str)
Sets the email body to HTML content
fn alternative(self, body_html: &str, body_text: &str) -> EmailBuilder
Sets the email content
fn set_alternative(&mut self, body_html: &str, body_text: &str)
Sets the email content
fn build(self) -> Result<Email, Error>
Builds the Email
Trait Implementations
impl PartialEq for EmailBuilder
[src]
fn eq(&self, __arg_0: &EmailBuilder) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &EmailBuilder) -> bool
This method tests for !=
.
impl Eq for EmailBuilder
[src]
impl Clone for EmailBuilder
[src]
fn clone(&self) -> EmailBuilder
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more