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