Struct emailmessage::MessageBuilder
source · pub struct MessageBuilder { /* private fields */ }
Expand description
A builder for messages
Implementations
sourceimpl MessageBuilder
impl MessageBuilder
sourcepub fn mailbox<H: Header + MailboxesHeader>(self, header: H) -> Self
pub fn mailbox<H: Header + MailboxesHeader>(self, header: H) -> Self
Add mailbox to header
sourcepub fn date(self, date: EmailDate) -> Self
pub fn date(self, date: EmailDate) -> Self
Add Date:
header to message
Shortcut for self.header(header::Date(date))
.
sourcepub fn date_now(self) -> Self
pub fn date_now(self) -> Self
Set Date:
header using current date/time
Shortcut for self.date(SystemTime::now())
.
sourcepub fn subject<S: Into<String>>(self, subject: S) -> Self
pub fn subject<S: Into<String>>(self, subject: S) -> Self
Set Subject:
header to message
Shortcut for self.header(header::Subject(subject.into()))
.
sourcepub fn mime_1_0(self) -> Self
pub fn mime_1_0(self) -> Self
Set Mime-Version:
header to 1.0
Shortcut for self.header(header::MIME_VERSION_1_0)
.
sourcepub fn sender(self, mbox: Mailbox) -> Self
pub fn sender(self, mbox: Mailbox) -> Self
Set Sender:
header
Shortcut for self.header(header::Sender(mbox))
.
sourcepub fn from(self, mbox: Mailbox) -> Self
pub fn from(self, mbox: Mailbox) -> Self
Set or add mailbox to From:
header
Shortcut for self.mailbox(header::From(mbox))
.
sourcepub fn reply_to(self, mbox: Mailbox) -> Self
pub fn reply_to(self, mbox: Mailbox) -> Self
Set or add mailbox to ReplyTo:
header
Shortcut for self.mailbox(header::ReplyTo(mbox))
.
sourcepub fn to(self, mbox: Mailbox) -> Self
pub fn to(self, mbox: Mailbox) -> Self
Set or add mailbox to To:
header
Shortcut for self.mailbox(header::To(mbox))
.
sourcepub fn cc(self, mbox: Mailbox) -> Self
pub fn cc(self, mbox: Mailbox) -> Self
Set or add mailbox to Cc:
header
Shortcut for self.mailbox(header::Cc(mbox))
.
sourcepub fn bcc(self, mbox: Mailbox) -> Self
pub fn bcc(self, mbox: Mailbox) -> Self
Set or add mailbox to Bcc:
header
Shortcut for self.mailbox(header::Bcc(mbox))
.
sourcepub fn mime_body<T>(self, body: T) -> Message<T>
pub fn mime_body<T>(self, body: T) -> Message<T>
Create message using mime body (MultiPart
or SinglePart
)
Shortcut for self.mime_1_0().join(body)
.
Trait Implementations
sourceimpl Clone for MessageBuilder
impl Clone for MessageBuilder
sourcefn clone(&self) -> MessageBuilder
fn clone(&self) -> MessageBuilder
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more